Peter Geoghegan, a PostgreSQL contributor, writes about database internals such as sorting, index bloat, JSONB, and building Postgres with Clang.
HN links it for PostgreSQL performance details. Commenters cite his posts on faster sorting with abbreviated keys in 9.5, Clang builds, and JSONB.
A possibly counterintuitive case where "the key...is expensive to compute" can be when accessing the key just requires following a pointer to something not in cache. It's not the same thing syntactically, but, for example, Postgres sped up collation by packing bytes into integers:
http://pgeoghegan.blogspot.com/2015/01/abbreviated-keys-exploiting-locality-to.html
I've also seen speedups sorting strings by first sorting prefixes of them packed into uint64s (rather than sorting pointer/length references to string data), and in an application where a friend needed to sort a lot of indices into an array, it turned out to greatly speed the sort (by avoiding indirections) to copy the whole array, sort the indices and the copy of the array together, then toss out the copy.
Sorting will be a lot faster on PostgreSQL 9.5:
http://pgeoghegan.blogspot.com/2015/01/abbreviated-keys-exploiting-locality-to.html
http://pgeoghegan.blogspot.com/2015/04/abbreviated-keys-for-numeric-to.html
I wonder whether and to what extent Vitesse benefits from using this technique, which is fairly well known (e.g. it appears in a 1994 paper by Gray -- Alphasort).
As I go into in the second link there, someone reported an order of magnitude increase in sort performance in one case.
For what it's worth, I doubt that this fully accounts for why Vitesse is faster. I don't know that I'd trust my data to it, but I don't think it's snake oil, even if some of the figures shown are arguably a bit misleading.
Right now it's more useful for uncovering bugs, I don't think anyone would recommend running Postgres compiled with clang on a production system.
For more info about performance, see http://pgeoghegan.blogspot.com/2011/07/could-clang-displace-gcc-generally-part.html
For even more detail, https://github.com/petergeoghegan/pg_hexedit
With further blog posts https://pgeoghegan.blogspot.co.uk/2017/11/pghexedit-rich-hex-editor-annotations.html and http://pgeoghegan.blogspot.co.uk/2018/01/exploring-sp-gist-and-brin-indexes.html
Peter is awesome and is also primarily responsible for a bunch of power consumption improvements: http://pgeoghegan.blogspot.com/2012/01/power-consumption-in-postgres-92.html
http://pgeoghegan.blogspot.com/2012/06/towards-14000-write-transactions-on-my.html may interest you