4 ms·
if lookups are essentially free, this has the potential to heavily cut down on the amount of data you need to store Assuming that the size of unique_library_si
by neilc 18y ago
if lookups are essentially free, this has the potential to heavily cut down on the amount of data you need to store
Assuming that the size of unique_library_size # is smaller than library_size. That's unlikely to be true for this example, but I get what you're driving at. However, column stores basically do this already: for example, you might store the library_size column ordered by size, and then compress it using either RLE or differential encoding (data item i is stored as a delta against data item i-1).
- frig 18y agoOh agreed, (I was assuming I could easily use eg 20 unpadded bits or whatnot for unique_library_size # but not necessarily get away with it easily for library_size; when that's the case it's always true that unique_library_size # needs less storage than library_size). Edit: to correct...it's always true that unique_libary_size # needs less storage than library_size except under very unlikely circumstances (...circumstances which get ruled out anyways if you do a more-granular calculation for when this strategy would make sense to consider).