3 ms·
What the author talks about is the theoretical performance of a programming language and I honestly believe that sample programs are the wrong experiment for th
by choeger 5y ago
What the author talks about is the theoretical performance of a programming language and I honestly believe that sample programs are the wrong experiment for that.
My hypothesis is that every programming language can approach optimal performance with enough effort. So the interesting question would be to measure the effort. As a proxy, one could maybe measure the time and experience-level of the programmers.
If I am really interested in the theoretical performance of a language, I'd use microbenchmarks for standard library functions. How much time does it take to sort an array? Reverse a list? Split a string? Etc.
Then there is of course the performance of the compiler or garbage collector. To compare this between different languages is the most difficult, I think. The best approach here is probably to take some real-world program (say a web server or a database), translate it nearly 1:1 and then compare the results. That's a tremendous effort for a single data point, though (albeit it would yield a nice collection of re-implementations, that could only help software quality).
- Thiez 5y ago> If I am really interested in the theoretical performance of a language, I'd use microbenchmarks for standard library functions. How much time does it take to sort an array? Reverse a list? Split a string? Etc. The standard library may not be implemented in the language you're evaluating. Especially for scripting languages, and things like regular expressions and bignums.