AD Teaching Wiki
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

FrontPage

Revision 85 as of 2011-02-02 16:16:22
AD Teaching Wiki:
  • JavaVsCplusplusWS1011

Welcome to the Wiki of the seminar '''Java vs. C++''' in the winter semester 2010 / 2011

This seminar is given by Prof. Dr. Hannah Bast, assisted by Björn Buchhold(buchholb@informatik.....). The seminar takes place every Wednesday, 2:15 pm - 3:45 pm, in the seminar room 01-018 in building 101. Our first session is on Wednesday, October 20, 2010. The last session is on Wednesday, February 9, 2011. On Wednesday December 29, 2010 and on Wednesday January 5, 2011 there is no session due to the christmas break. That's 15 sessions altogether. All sessions are recorded (video + audio).

The seminar is about the performance differences between Java and C++, in particular, running time and space consumption. It's NOT about the differences in syntax, language features, ease of programming, etc. The sessions will be recorded, and the slides as well the recordings will be put online after each presentation: see the links below.

Information and materials for each session

  1. Wednesday October 20, 2010: Introduction and Overview, Hannah Bast, slides, recording as AVI (not cut).

  2. Wednesday October 27, 2010: Machine code generation in C++, Hannah Bast,slides, recording as AVI (not cut).

    • Topics: x86 Assembler (history, registers, instructions, stack, function calls, some simple programs, MXX 128-bit streaming registers).

    • Remember 1: Write an array of 256 million ints = 1 GB. C++ unoptimized (gcc -O 0): 1.1s, Java: 0.8s, Hand-written assembler code: 0.6s, C++ optimized (gcc -O 3): 0.4s.

    • Remember 2: C++ unoptimized (gcc -O 0) translates the code line by line to machine code (just like Java without JIT).

    • Remember 3: Almost all PCs / notebooks / servers today use x86. Mobile phones etc. use RISC.

  3. Wednesday November 3, 2010: The Java Virtual Machine (Robin Schirrmeister),slides as pdf, slides as odprecording as WMV.

  4. Wednesday November 10, 2010: Compiler optimization in C++ (Jens Hoffmann), slides as pdf recording as WMV.

  5. Wednesday November 17, 2010: NO SESSION.
  6. Wednesday November 24, 2010: Java Just-in-Time Compilation (Jan Kelch), slides as pdf recording as WMV.

  7. Wednesday December 1, 2010: Memory management in C++ (Simon Rettberg), slides as pdfrecording as WMV.

  8. Wednesday December 8, 2010: Memory management in Java (Arda Akcay), recording as WMV.

  9. Wednesday December 15, 2010: GCJ (Thomas Liebetraut), slides as pdf recording as WMV.

  10. Wednesday December 22, 2010: RTL optimization (Alexander Nutz) slides as pdf recording as WMV.

    • Topics: RTL in GCC - compiler internal representations: AST, CFG ; RTL as GCC's intermediate representation ; optimizations done in RTL

    • AST (abstract syntax tree) is the representation a compiler works on, CFG (control flow graph) is for some (quite common) analyses
    • For hardware-independent optimizations RTL is gradually replaced by Tree-SSA but it is still necessary for hardware-dependent optimizations like register allocation and still many optimizations are done in it
    • When trying to read RTL (all passes can be output by -fdump-rtl-all) the sixth argument of each (insn ...) is the interesting one (LISP-like syntax)
  11. Wednesday January 12, 2010: Arrays Java vs. C++ (Simon Skilevis, Ammar Qaseem) c++ slides as powerpoint c++ slides as pdf java slides as powerpoint .

    • Topics ( C++ ): 1D Array Representation and Space Overhead of 1D Array .

    • 2D Array Representation ( Row-mapping representation,Column-mapping representation,and Array-of-array representation) and Space Overhead of each way.
    • Buffer Overflow ( no Bounds Checking ): C and C++ provide no built-in protection against accessing or overwriting data in any part of memory and solution for this problem.
    • Dynamic memory allocation( new and delete operator).
    • STL-Vector as dynamic array and advantages of Vectors.
    • Topics ( Java ):

  12. Wednesday January 19, 2010: Strings Java vs. C++ (Michael Pereira, Christoph Hofmann) recording as WMV..

  13. Wednesday January 26, 2010: NO SESSION.
  14. Wednesday February 2, 2010: Threads Java vs. C++ (Niklas Meinzer).
  15. Wednesday February 9, 2010: Graphical User Interfaces Java cs. C++ (Daniel Brand, Franz Dietrich).

Interesting additional topics: smart pointers / auto pointers / scoped pointers in C++.

  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01