Quadrupling code performance with a "useless" if
- July 12, 2026So I was optimizing a domain-specific compressor the other day, as one does.
- One important problem was chunking the input string and optimally choosing the most compact encoding for each chunk (different encodings compress different characters better, so where to split is not immediately obvious).
- The previous post describes the algorithm if you’re interested, but it boils down to finding the shortest path on a grid.
Unverified
- July 12, 2026So I was optimizing a domain-specific compressor the other day, as one does.
- One important problem was chunking the input string and optimally choosing the most compact encoding for each chunk (different encodings compress different characters better, so where to split is not immediately obvious).
- The previous post describes the algorithm if you’re interested, but it boils down to finding the shortest path on a grid.
Sources: Purplesyringa