4 ms·
This algorithm is pretty neat. I wonder if for the use case outlined by the post they could get even better compression through the use of fewer significant dig
by sameoldtune 2y ago
This algorithm is pretty neat. I wonder if for the use case outlined by the post they could get even better compression through the use of fewer significant digits. For the purposes of recording times, 0. 00768 is likely just as useful as 0.0076792240142822266
- Chabsff 2y agoThat's already (one of) the main property that the algorithm is exploiting: That f64 is an horribly overkill representation for the data since it was generated using a microsecond clock, leading to a lot of trailing zeros. So yeah, dropping more significant digits should lead to even better compression. But if we are going to be massaging the data based on what we know/need, there are better ways to go about compressing it. e.g. I'd expect that simple fixed-point quantization with a delta encoding would compress better than this. What I find cool about this is that it dynamically figures things out without having to deal with any priors.
- cwinter 2y agoyes! the very last example in the post shows what happens if you truncate the mantissa to just the 4 most significant bits