Hacker News new | ask | show | jobs
by nonadhocproblem 2 days ago
I agree but this feels like a bit of a red herring since we're talking about performance here. Imagine trying to design a compression algorithm that's "maximally bad" in this sense. That is, it is extremely performant and correct on most data (it roundtrips), but there's some class of data for which it fails (decompression doesn't produce the original bytes), and fixing the algorithm just for this class of data takes away its performance advantages on most classes of data. In practice, this seems quite hard/weird to do.

Although relatedly, it's definitely possible for claims on performance (instead of correctness) to only hold on certain classes of data.

1 comments

> this seems quite hard

I dunno, do matching against a hash table and only compare a short fingerprint. It'll be a meaningful speed up, usually be right. Fail in exceptional cases, and lose the performance advantage if you fix it.