News for hackers. Stuff that matters.
Re:Yet Another Language Speed Test – Counting Primes by userbinator on Friday July 03, 2015 @11:12PM (#9828987)
As such, there's nothing preventing any of the optimizing compilers from optimizing the entire program to essentially print("pi<num> = <num>").

That has clearly not happened here. If it did, you would see a flat line regardless of n. Nevertheless it is a good idea to make it e.g. take n as a commandline parameter, even if only to make testing different values easier.

Ditto, time to load interpreters is included, whereas time to load compilers is excluded.

You don't have to load the compiler every single time you run the program, whereas that isn't the case with an interpreter.

Also, note that the output is different in format for the different languages.

It's performing a single output operation at the very end of the computation. Any difference in that would be completely lost in the noise as n increases and the computation time dominates.

On a different note: he mentions PyPy in passing but doesn't post benchmark numbers

PyPy is there between JavaScript and Ruby:

https://bjpelc.files.wordpress.com/2015/01/graph3.png

There are no comments on this comment yet.