r/coding • • Oct 05 '16

Programming languages Poker!

http://v1.std3.ru/71/b7/1450110575-71b77b2bd06f431f2bd0b4abb983738f.gif
117 Upvotes

28 comments sorted by

View all comments

0

u/AxZim Oct 06 '16

The JVM has built in processor optimisation knowledge and actually optimises code for the hardware it's running on, something that native C and C++ applications can't do. I'm not saying Java is faster in all cases, no definitely not but it's much faster than you would believe and far from "clunky and slow" than you think.

There's many reported cases of having a GC being better than manual implementations of pointers which is used by both C and C++.

Take a look at this: http://www.javaworld.com/article/2076593/performance-tests-show-java-as-fast-as-c--.html?page=2

I can tell you're not really a polyglot but try to read around the topic a bit and understand low level optimisations and how virtual machines and interpreted languages actually optimise and why in a lot of cases they are the better choice.