Go to file
Ivan Zahariev f65af29797 Limit running time by an ENV variable 2016-09-08 17:57:49 +03:00
cpp-optimizations Initial commit 2016-02-04 21:32:08 +02:00
results Initial commit. Work still in progress 2016-07-27 13:43:14 +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 Introduce more ENV settings 2016-09-07 21:19:55 +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.