zlacker

[return to "For algorithms, a little memory outweighs a lot of time"]
1. whatev+ti[view] [source] 2025-05-21 21:31:16
>>makira+(OP)
Lookup tables with precalculated things for the win!

In fact I don’t think we would need processors anymore if we were centrally storing all of the operations ever done in our processors.

Now fast retrieval is another problem for another thread.

◧◩
2. crmd+Jz[view] [source] 2025-05-22 00:23:09
>>whatev+ti
Reminds me of when I started working on storage systems as a young man and once suggested pre-computing every 4KB block once and just using pointers to the correct block as data is written, until someone pointed out that the number of unique 4KB blocks (2^32768) far exceeds the number of atoms in the universe.
◧◩◪
3. ww520+ND[view] [source] 2025-05-22 01:13:20
>>crmd+Jz
The idea is not too far off. You could compute a hash on an existing data block. Store the hash and data block mapping. Now you can use the hash in anywhere that data block resides, i.e. any duplicate data blocks can use the same hash. That's how storage deduplication works in the nutshell.
◧◩◪◨
4. valent+8E[view] [source] 2025-05-22 01:18:45
>>ww520+ND
Except that there are collisions...
◧◩◪◨⬒
5. ww520+N72[view] [source] 2025-05-22 16:16:24
>>valent+8E
Can use cryptographic hashing.
◧◩◪◨⬒⬓
6. anonym+Qg2[view] [source] 2025-05-22 17:02:11
>>ww520+N72
How does that get around the pigeonhole principle?

I think you'd have to compare the data value before purging, and you can only do the deduplication (purge) if the block is actually the same, otherwise you have to keep the block (you can't replace it with the hash because the hash link in the pool points to different data)

◧◩◪◨⬒⬓⬔
7. ww520+Nu3[view] [source] 2025-05-23 01:00:15
>>anonym+Qg2
The hash collision chance is extremely low.
◧◩◪◨⬒⬓⬔⧯
8. valent+Mw3[view] [source] 2025-05-23 01:21:47
>>ww520+Nu3
For small amounts of data yeah. With growing data, the chance of a collision grows more than proportional. So in the context of working on storage systems (like s3 or so) that won't work unless customers actually accept the risk of a collission as okay. So for example, when storing media data (movies, photos), I could imagine that, but not for data in general.
◧◩◪◨⬒⬓⬔⧯▣
9. ww520+cB3[view] [source] 2025-05-23 02:07:27
>>valent+Mw3
Cryptographic hashing collisions are very very small, like end of universe in numerous times small. They're smaller than AWS being burnt down and all backups were lost leading to data loss.
[go to top]