Allocation in modern JVMs is far faster than the best performing malloc implementations. The common code path for new Object() in HotSpot 1.4.2 and later is approximately 10 machine instructions, whereas the best performing malloc implementations in C require on average between 60 and 100 instructions per call.
Good to know about that since I always thought anything Java would be slower than C++. Makes me feel less guilty when writing Java.
All this also reminds me of this sig I saw once on usenet:
The march of progress:
cout << style="font-weight: bold;">
java.text.NumberFormat formatter = java.text.NumberFormat.getNumberInstance();
String s = formatter.format(x);
for (int i = s.length(); i <>