3 ms·
This is one of the reasons microbenchmarks are really not particularly useful, especially when comparing two different languages. You have to intentionally crip
by Jweb_Guru 12y ago
This is one of the reasons microbenchmarks are really not particularly useful, especially when comparing two different languages. You have to intentionally cripple the optimizer in order to even get some of them to run the "actual" algorithm. And you have to restrict the algorithm used even if it might be impossible to implement the fastest algorithm as efficiently in one or more of the languages. You might argue that the point isn't to test the particular code, but the properties of the language and its optimizer. That's fair, but what about languages like Go that don't try to do constant folding like this in the name of fast compilation, or interpreted languages that don't perform JIT compilation? They are going to look unrealistically good on benchmarks like this compared to how similar routines would perform in an actual program.