Speed up Data.Unique
Data.Unique code seems heavier than necessary:
- It uses
Integerwhen it can surely get away with less than two words on 64-bit systems.
- It effectively guarantees that uniques will be consecutive, which isn't very useful.
I don't know how to fix this, but I'm confident there's a better way out there.
One silly idea: use one 100 or so-bit counter per capability. Use the rest of the bits to distinguish among the capabilities. To reduce hash collisions, make each capability increment its counter by a different prime number (or something like that).