/mobile Handheld Friendly website
The Computer Language |
"After all, facts are facts, and although we may quote one to another with a chuckle the words of the Wise Statesman, 'Lies--damned lies--and statistics,' still there are some easy figures the simplest must understand, and the astutest cannot wriggle out of." Leonard Henry Courtney, 1895
Here you'll find provisional facts about the performance of programs written in ≈24 different programming languages for a dozen simple tasks. Here you'll find some easy figures which compare the fastest programs contributed for each programming language.
When the facts are about the performance of programs, the particular way each program does a task matters a lot. Obviously when programs implement different algorithms that difference may itself be enough to explain any difference in program performance. Less obviously, even when the same program is measured with different implementations of the same programming language, the particular way that program does the task may work better with one of the language implementations than the other - but slight changes to the program might reverse that performance difference. So there has to be some flexibility allowed in the way programs implement the same algorithm, and the tasks are kept simple enough for you to check the program source code.
When the facts are about a wide range of different programming languages even more flexibility has to be allowed in the way programs implement the same algorithm - after all, the point of using a different language is for the different approach that language provides. A comparison between programs written in such different languages is a comparison between apples and oranges - but sometimes the choice is between apples and oranges.
There exist multiple implementations for some programming languages - different C++ compilers, different Java VMs - but those other language implementations are not shown here. There exist entirely different programming languages which could be used to program these simple tasks - but those other languages are not shown here. There exist countless other tasks which could be the basis for a performance comparison of programming language implementations - but those other tasks are not shown here. If you're interested in something not shown here then please take the program source code and the measurement scripts and publish your own measurements.