As a Software Engineer, the mind is trained to seek optimizations in every aspect of development and ooze out every bit of available CPU Resource to deliver a performing application. This begins not only in designing the algorithm or coming out with efficient and robust architecture but right onto the choice of programming language. Most of us, as we spend years in our jobs — tend to be proficient in at least one of these.

Recently, I spent some time checking on the Performance (not a very detailed study) of the various programming languages. One, by researching on the Internet; Two, by developing small programs and benchmarking. The legacy languages — be it ASM or C still rule in terms of performance. But these are definitely ruled out for enterprise applications due to the complexity in development, maintainability, need for object orientation, and interoperability. They still will win for mission-critical or real-time systems, which need performance over these parameters. There were languages I briefly read about, including other performance comparisons on the internet. These include Python, PHP, Perl, and Ruby. Considering all aspects and needs of current enterprise development, it is C++ and Java which outscore the other in terms of speed. According to other comparisons [Google for ‘Performance of Programming Languages’] spread over the net, they clearly outshine others in all speed benchmarks. So much for my blog title :-) So when these titans are pit against each other in real-time, considering all aspects of memory and execution time — Java is floored. Though I have spent the last ~17 years (In 2021) of my life coding and perfecting my Java and J2EE skill — I suddenly feel… Ahem, Slow! One of the problem statements to verify this is given below (along with the associated code) and the associated execution parameters.

#performance #c++ #programming languages #core java #computing #computer hardware #complexity metrics #optimization and algorithmic aspects #platform independence

SKP's Java/Java EE Gotchas: Clash of the Titans, C++ vs. Java!
1.30 GEEK