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
Wednesday October 20, 2010: Introduction and Overview, Hannah Bast, slides, recording as AVI (not cut).
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.
Wednesday November 3, 2010: The Java Virtual Machine (Robin Schirrmeister),slides as pdf, slides as odprecording as WMV.
Wednesday November 10, 2010: Compiler optimization in C++ (Jens Hoffmann), slides as pdf recording as WMV.
- Wednesday November 17, 2010: NO SESSION.
Wednesday November 24, 2010: Java Just-in-Time Compilation (Jan Kelch), slides as pdf recording as WMV.
Wednesday December 1, 2010: Memory management in C++ (Simon Rettberg), slides as pdfrecording as WMV.
Wednesday December 8, 2010: Memory management in Java (Arda Akcay), recording as WMV.
Wednesday December 15, 2010: GCJ (Thomas Liebetraut), slides as pdf recording as WMV.
Wednesday December 22, 2010: RTL optimization (Alexander Nutz) slides as pdf recording as WMV.
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 fo this poblem.
- Dynamic memory allocation( new and delete operator).
- Vector as dynamic array and advantages of vectors.
- Wednesday January 19, 2010: Strings Java vs. C++ (Michael Pereira, Christoph Hofmann).
- Wednesday January 26, 2010: NO SESSION.
- Wednesday February 2, 2010: Threads Java vs. C++ (Niklas Meinzer).
- 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++.