Extremely contrived GCC vs V8 benchmark

layout: post published: true Date: 2011-06-10 Tags: - benchmarks - compilers - dumb posterous_url: http://blog.ajdecon.org/extremely-contrived-gcc-vs-v8-benchmark posterous_slug: extremely-contrived-gcc-vs-v8-benchmark

On Hacker News today, someone posted a link to an extremely contrived benchmark in which it was claimed that the V8 Javascript compiler was faster than GCC. This was true, in the very narrow case where GCC was prevented from optimizing properly while V8 was run in ideal conditions, and in which the benchmark was compile time plus run time rather than run time alone.

I wouldn't post this, except that I've been reading a lot about benchmarking recently and this is an excellent example of how to do it completely wrong. Brennan at comment 12 on the original post sums it up:

What you've just written is one of the most contrived benchmarks I
have ever read. At no point in your rambling, incoherent argument were
you even close to anything that could be considered an objective
comparison. Everyone in this room is now dumber for having read it. I
award you no points, and may God have mercy on your soul.