The world might be missing a programming language
Alex Mills
77632

You know Java is not x2 slower then c++ because it is interpreted. That performance hit comes from the way java lays data in memory. Any object can be retrieved by issuing a load instruction to main memory. But while in C, C++ that returns the desired object in Java it is usually another reference and that results in another load (we call it a cache miss). With performance improvements to modern CPU like speculative branch prediction, out of order executions etc. CPU runs from one cache miss to the other, and gets bored in between. So you can write code that will be as fast as c++ in Java you just have to know how.

Now there is a project in Oracle called Valhalla that will fix that. When that happens object in memory will be allocated as structures. And then i think C++ will really die.

Plus there are some things like fork-join algorithm (arguably the best way to do concurrency) that can’t really be done in C++ efficiently. The rate of object creation is simply too big for manual memory management.

Also you didn’t mention the Go parallel execution model. I mean the gorunites that not relay on OS scheduler but instead are paused by the run-time itself. That allow us to avoid expensive context switching. Approaching concurrency this way is much better because you can write your code as you always would where you block your operation when accessing external resource and when the response returns you simply resume where you stopped. Avoiding callback hell associated with the event loop. And avoiding resource consumption. And not to sound like a broken record but this also is coming to Java :).

I have nothing against NodeJS I thing it is a great tool for certain domains. QraphQL + NodeJS + MonogDB you would not believe how fast you can be productive with the proper stack. But strong type system is ultimately what you need for the hard code businesses domain that makes your company money.

All and all I believe in the right tool for the Job. And don’t think that ever be one size fits all. Great article it really force me to think.