Saturday, 17 August 2013

Java Heap Allocation Faster than C++

Java Heap Allocation Faster than C++

I already posted this question on SO and it did ok. It was unfortunately
closed though(only needs one vote to reopen) but someone suggested I post
it on here as it is a better fit so the following is literally a copy
paste of the question



I was reading the comments on this answer and I saw this quote.
Object instantiation and object-oriented features are blazing fast to use
(faster than C++ in many cases) because they're designed in from the
beginning. and Collections are fast. Standard Java beats standard C/C++ in
this area, even for most optimized C code.
One user (with really high rep I might add) boldly defended this claim,
stating that
heap allocation in java is better than C++'s
and added this statement defending the collections in java
And Java collections are fast compared to C++ collections due largely to
the different memory subsystem.
So my question is can any of this really be true, and if so why is java's
heap allocation so much faster.

No comments:

Post a Comment