Go to file
Ivan Zahariev 6716271477 Due to a bug in node.js 4.3, we need to declare and init on separate lines, or else node.js performs about four times slower.
See: https://blog.famzah.net/2016/09/10/cpp-vs-python-vs-php-vs-java-vs-others-performance-benchmark-2016-q3/#comment-21872
2016-10-18 11:42:01 +03:00
cpp-optimizations Initial commit 2016-02-04 21:32:08 +02:00
java-optimizations LinkedList info 2016-09-22 22:15:51 +03:00
results Make it work on OS X. Allow analyze script to continue if it sees a skipped test due to missing language/compiler. 2016-10-17 20:55:55 +02:00
LICENSE Initial commit 2016-02-04 21:30:25 +02:00
README.md Add link to the "Benchmarks game" @ alioth.debian.org 2016-10-12 20:42:59 +03: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 using time.Since 2016-10-12 01:24:32 +02:00
primes.java Limit running time by an ENV variable 2016-09-07 21:34:42 +03:00
primes.js Due to a bug in node.js 4.3, we need to declare and init on separate lines, or else node.js performs about four times slower. 2016-10-18 11:42:01 +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 Re-indent using tabs 2016-10-12 20:17:46 +03:00
primes.rb Limit running time by an ENV variable 2016-09-08 17:57:49 +03:00
primes.rs Do not preallocate the vec to the known size so we are fair and do what other tests are doing 2016-10-09 23:54:53 +02:00
run.sh Quoting variables in Bash never hurts :) 2016-10-17 22:51:29 +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 programs run for 90 wall-clock seconds and there are 6 identical runs, 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.

Another similar project: https://benchmarksgame.alioth.debian.org/