← Back to context

Comment by charleslmunger

10 days ago

You have a list of IDs, and want to make them compact for storage or transport - fast and simple way is to sort and delta encode.

Hmm. That’s fair, though I’d probably use set operations instead. What you find though is that for most other problems besides diffing, ID order is not chronological order, so you need to sort by a date stamp instead. But I’m typically letting the database do that, so I’m a consumer of sorted numbers, but not an implementor. Because what I sort is nearly always compound sorts. By field A, then field B and field C if those two still don’t cut it.