2 ms·
No, he's right. That's "optimize for the test spec". Detect an idiom and optimize it is very common in this situation. For example, commercial compilers are of
by DannyBee 9y ago
No, he's right.
That's "optimize for the test spec".
Detect an idiom and optimize it is very common in this situation.
For example, commercial compilers are often written to specifically detect and rewrite idioms/code in oft-used benchmarks (that aren't common to the real world), etc
Your browser's javascript engine almost certainly does it.
They aren't cheating, they are just making the test worthless by optimizing it.
They still shouldn't do it, but it's super-common.