a. How does Java's speed today compare to C++? Difficult to
measure. It's worth noting that a major part of the speed of an
implementation, it's memory allocator, are very different
algorithms in Java and C++. The non-deterministic nature of the
collector makes it extremely difficult to obtain meaningful
performance data in comparison to the deterministic memory
management of C++, because you can never be certain what state
the collector is in. This means that it's very hard to write a
benchmark that might meaningfully compare them. Some memory
allocation patterns run much faster with a GC, some run much
faster with a native allocator. What I would say, however, is
that the Java GC has to run fast in every situation. A native
allocator, however, can be swapped out for one that's more
appropriate. I recently fielded a question on SO about why a C#
Dictionary could execute in (0.45 ms on my machine) compared to
an equivalent std::unordered_map which executed on (10ms on my
machine). However, by simply swapping