Go to file
Ivan Zahariev b9afdca36f Read $output_mode as a command-line argument 2016-09-09 23:33:30 +03:00
cpp-optimizations Initial commit 2016-02-04 21:32:08 +02:00
results Read $output_mode as a command-line argument 2016-09-09 23:33:30 +03:00
LICENSE Initial commit 2016-02-04 21:30:25 +02:00
README.md add ruby 2016-08-05 12:43:49 +08:00
primes-alt.java Limit running time by an ENV variable 2016-09-07 21:34:42 +03:00
primes.cpp Limit running time by an ENV variable 2016-09-07 21:47:03 +03:00
primes.go Limit running time by an ENV variable 2016-09-07 21:58:43 +03:00
primes.java Limit running time by an ENV variable 2016-09-07 21:34:42 +03:00
primes.js Limit running time by an ENV variable 2016-09-07 22:04:46 +03:00
primes.php Limit running time by an ENV variable 2016-09-08 17:44:06 +03:00
primes.pl Limit running time by an ENV variable 2016-09-08 17:46:47 +03:00
primes.py Limit running time by an ENV variable 2016-09-08 17:50:42 +03:00
primes.rb Limit running time by an ENV variable 2016-09-08 17:57:49 +03:00
run.sh Rename some language titles to match the previous benchmark results 2016-09-09 23:17:35 +03:00

README.md

langs-performance

C++ vs. Python vs. Perl vs. PHP vs. Java vs. NodeJS vs. Go vs. Ruby performance benchmark

Blog articles:

The benchmarks here do not try to be complete, as they are showing the performance of the languages in one aspect, and mainly: loops, dynamic arrays with numbers, basic math operations.

The times include the interpretation/parsing phase for each language, but its so small that its significance is negligible. The math function is called 10 times, in order to have more reliable results. All scripts are using the very same algorithm to calculate the prime numbers in a given range. The correctness of the implementation is not so important, as we just want to check how fast the languages perform. The original Python algorithm was taken from http://www.daniweb.com/code/snippet216871.html.