4 ms·
1. A 32-bit hash isn't enough no matter what (birthday paradox), 64-bit might be if you don't have adversaries choosing {SLUG} strings and it's the truncation o
by jepler 10y ago
1. A 32-bit hash isn't enough no matter what (birthday paradox), 64-bit might be if you don't have adversaries choosing {SLUG} strings and it's the truncation of a cryptographic hash. (compare with 32-bit public key IDs in PGP)
2. Are you going to really enforce {SLUG} being unique for the lifetime of your system?
- myf01d 10y agoThanks for reply 1. you're right that 32-bit isn't enough for tens of thousands of slugs (maybe even thousands?), I just need to design a performant and economic url design, like in letterboxd.com 2. yes, my project is about artistic works, so the work name wont change and subsequently the slug. Since I use Postgres which has only 32-bit and 128-bit integers, is there a considerable performance hit if I use the latter with 64-bit or 128-bit algorithm so I reduce the probability of collision?