Go to file
David Zaragoza Rodriguez 282c95ebb3 Port of the Python version to D 2018-01-27 15:55:24 +01:00
cpp-optimizations Initial commit 2016-02-04 21:32:08 +02:00
dotnet Initial commit. Simple command wrappers 2016-11-03 23:17:00 +02:00
java-optimizations LinkedList info 2016-09-22 22:15:51 +03:00
results Correction of the "C# .NET Core" tests; this time done at full CPU power (laptop running not on battery) 2016-11-04 09:57:19 +02:00
LICENSE Initial commit 2016-02-04 21:30:25 +02:00
README.md Port of the Python version to D 2018-01-27 15:55:24 +01: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.d Port of the Python version to D 2018-01-27 15:55:24 +01:00
primes.dotnet Symlink to the C# .NET Core implementation 2016-11-04 00:25:23 +02: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
primes.swift Minor refactoring, so that the code workflow is the same as the other languages 2018-01-12 12:23:12 +02:00
run.sh Port of the Python version to D 2018-01-27 15:55:24 +01:00

README.md

langs-performance

C++ vs. Python vs. Perl vs. PHP vs. Java vs. NodeJS vs. Go vs. Ruby vs. Rust vs. Swift vs. D 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/