Skip to content

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

License

Notifications You must be signed in to change notification settings

avrilnoeme/langs-performance

 
 

Repository files navigation

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 it’s 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/

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Perl 29.3%
  • Shell 18.3%
  • C++ 13.8%
  • Java 9.7%
  • C# 6.3%
  • Rust 4.6%
  • Other 18.0%