↓ Skip to main content

“Rounding up to the next power of 2 causes an average of 25% of memory to get wasted.”

David Rowleycitusdata.com ↗

Four changes, and single-column sorts run about 26 percent faster in Postgres 15. One fix just stops wasting a quarter of sort memory on power-of-two rounding. Nobody had to rewrite anything in a new language. Real performance work is boring, measured and done by people who read the allocator.