23 points hnp9j9qtda 2 days ago 3 comments
gopalv 13 hours ago | parent
Switch case is the workhorse of a lexer, parser and execution engine. Lots of them over enums.
This was all mis-optimized for years thanks to Spectre/Meltdown changing how the actual runtime of pre-fetch and speculation used to work.
All my work on CGOTO was made irrelevant by the CPU advances, only to become relevant again when fetch speculation got nerfed.
The indirect call scenario is a bit more interesting, because the JVM has an amazing paper about interface dispatch caches [1] on how to do it runtime instead of compile time.
The PGO is still useful, but not unless you can predict the workload you're going to have - Benchmarketing with a TPC benchmark is a good situation for it.
If you have consistent hardware, tuning an OLTP system for the hardware is much more interesting. Going back in the memory hole, Yahoo used to have a Jeremy Cole build of Mysql which was specially optimized for the raid disk layout that was in production (ZFS came by to fix those issues directly).
shaggie76 12 hours ago | parent
Our most recent test of LTCG was actually interesting because it seemed to move the needle enough to measure (but not enough to suffer). It appeared as though it optimized the vast majority of the code for size (inlining sparingly) and we speculate that the improvements to cache usage were the reason we saw improvements.
zX41ZdbW 10 hours ago | parent
* https://github.com/ClickHouse/ClickHouse/pulls?q=is%3Apr+sta...