I will being streaming "Cache Invalidation Isn't Hard" at http://twitch.tv/handmade_hero shortly. The topic of this lecture will be that cache invalidation isn't hard, and will include discussions on cache invalidation and it's not-being-hard-ness.
-
-
Replying to @cmuratori
@cmuratori refterm leans on the hashing function's strength to "guarantee" two different glyphs won't map to the same hash. If a collision happens, refterm would just render an incorrect glyph. In what other scenarios (not refterm) would you add the extra key validation?1 reply 0 retweets 0 likes -
Replying to @_trackno5
A 128-bit hash collides roughly every 2^64 unique inputs. I would add the extra key validation when Unicode defines a UTF-64 standard.
1 reply 0 retweets 0 likes -
Replying to @cmuratori
Fair point. I get the point of the probability being incredibly low, but I was thinking in the lines of something where getting the correct answer 100% of the time mattered. Like caching user profile pictures. (although maybe it doesn't matter all that much).
2 replies 0 retweets 0 likes -
Replying to @_trackno5
The chance of a double-bit error in ECC RAM is supposedly around once every 16 million days. The chance of two 128-bit hashes colliding is once every 2^64 hashes. To make that happen once every 16 millions days, you would have to do 13 million hashes per second, every day.
1 reply 0 retweets 0 likes -
-
Replying to @cmuratori @_trackno5
Futhermore, not only would you have to do that many hashes, you would actually have to be _storing them all_ in your hash table - the magical 2^64 large hash table, which nobody can store because that much storage doesn't currently exist.
2 replies 0 retweets 0 likes -
Replying to @cmuratori @_trackno5
I suppose the same logic apply for generating GUIDs? As in, if I just generate a radnomy 128 bit number (assuming a good random number generator) then I don't need to bother verifying that it hasn't already been generated before.
1 reply 0 retweets 0 likes
That is true for cryptographic number generation, but not other kinds of random number generation.
-
-
Replying to @cmuratori @_trackno5
Thanks for the confirmation. I was contemplating using it, but was very uncertain about its reliablility.
0 replies 0 retweets 0 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.