Ever heard of superoptimizers? No, neither had I, until a lecture with Des Watson as part of Topics in Computer science, a module I'm taking this term.

They're comically interesting: a brute-force approach to writing software. Instead of trying to work out the most efficient way to code your program, just try all the possible combinations of instructions; I mean, how many can there be?

Well, lots, actually - and that's one of the big problems with the approach, finding ways to cut down the space of possible programs you look through. But the good news is that superoptimizers have a tendency to find bizarre, curious ways of taking advantage of specific characteristics of the hardware which humans don't tend to notice. Show a superoptimized piece of code to a human being - even, say, an architect of the processor it runs on - and she'll scratch her head and wonder how it can work.

Anyhow, I've chosen superoptimizers as the subject for my end-of-term project, so here's a literature review I've written on the topic as part of my coursework, if you're interested in finding out more.

And thanks in advance for anyone who dares point out that code *I* write looks like it's been brute-forced into existence…