Produced | OSC Open Source Community (ID: oschina2013)
“What programming language is the fastest?” To answer this question, The Benchmarks Game specially designed performance tests for mainstream programming languages. The items tested include (click the end of the article to read the original text for details):
-
fannkuch-redux
-
n-body
-
spectral-norm
-
mandelbrot
-
pidigits
-
regex-redux
-
fasta
-
k-nucleotide
-
reverse-complement
-
binary-trees
The developer made a visual chart based on the test data of The Benchmarks Game, as shown below, gray reflects time efficiency, shorter represents better performance, and brown is a weighted value based on execution time and memory overhead.
It can be seen that some of the results are still a bit unexpected. For example, Python, although it is known that its performance is relatively backward, it was unexpectedly at the bottom in terms of execution time. C, C++, and Rust show the lead in execution time, followed by C# and Julia, and Go and Java are comparable, but farther back.
Then there are Node.js, Swift and Dart, and PHP, which also present different performance gaps.
The text and pictures in this article are from the OSC open source community
This article is reprinted from https://www.techug.com/post/performance-pk-of-major-mainstream-programming-languages-unexpected-results48ca6676ad0a791fada5/
This site is for inclusion only, and the copyright belongs to the original author.