News for hackers. Stuff that matters.
Re:The One Billion Row Challenge in Go: from 1m45s to 4s in ... by Shorel on Tuesday March 05, 2024 @07:24AM (#39602433)
> JVM has always been on par if not often faster than hand-written C code.

I have never found this to be true.

There are a few programs (Talend, MySQL workshop) written in Java that I sometimes have to use, and I avoid them as much as I can, because they are slow, bloated, and eat lots of memory.

Java new operator is faster than malloc, because Java allocates all memory needed from the OS before starting the program. And malloc is extremely slow. C++ new operator uses malloc so it is also slow.

Stack allocation in a C program is hundreds of times faster than using new in Java.

And that's for one feature, there are many other features like C++ compile-time calculations in templates that simply have no Java equivalent.

There are no comments on this comment yet.