4 ms·
Regarding the performance of C, it is interesting to note that although hardly anyone does it, Java, for example, can still be very very low-level if you want.
by martinced 14y ago
Regarding the performance of C, it is interesting to note that although hardly anyone does it, Java, for example, can still be very very low-level if you want.
You can still allocate a gigantic primitive array (say of Java 32-bits integers) and mess with it, including doing bit-trickery, etc. and that is amazingly fast.
When people want the uttermost speed in Java, they dodge objects as much as they can to prevent too much GC'ing.
For example that is how the people behind the amazing LMAX disruptor "pattern" (hardly a "pattern" in the OO sense) manage to handle, on a single thread, to process about 12 millions events... Per second. In Java.
"Thankfully" Java still allows to create a gigantic primitive array and to directly mess inside that array.