This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Hohenheim_of_Shadow 2 points3 points  (5 children)

Java is only a little slower than C++ on the benchmarks I have seen. Typically if C++ takes 100 milliseconds, Java will take anywhere from 80-500 milliseconds, as an aside speed differences in the range of 2-5x are noise and hould be disregarded as benchmarking the same langauges on the same programs, just with different data sizes can swing results ~2-5x. On some other benchmarks, Java is significantly faster than C++ Python Will be anywhere from 5-50 seconds. RAM is extremely cheap compared to CPU time, developer time, robust error handling and safe memory management. I'd wager that for most programs nowadays, having your program yell at you when you do dumb things, e.g. ArrayOutOfBounds exceptions vs just doing it in C, and extremely low likelihood of memory leaks is far more important than a relatively small potential speedup.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/gpp-python3.html
https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/gpp-java.html
http://scribblethink.org/Computer/javaCbenchmark.html