4 ms·
At a guess: that hash is performed relatively few times, so any performance difference is lost in the noise floor. Never having to answer "why did you use this
by moreati 3y ago
At a guess: that hash is performed relatively few times, so any performance difference is lost in the noise floor. Never having to answer "why did you use this insecure hash" or eliminating/minimising any possibility of a class of security problem is worth more.
- winrid 3y agoThis has nothing to do with security. It's just wasted CPU. I imagine you have to do this every time you make a query to lookup the users DB? Security is not a concern here. It's just literally bucketing ids. Also, this is not needed with modern file systems.
- whyrusleeping 3y agoall modern server CPUs have intrinsics for sha256, it just doesnt matter CPU-wise
- winrid 3y agoIt looks like for something the size of a UUID on Node 18, on my 8th Gen i7 (main machine broken) MD5 is only 10% faster. I guess I was remembering a time when it was like twice as fast... Neat. :)