Hey coders 👋
If you are a JavaScript developer, I am pretty much sure that you have used the npm package UUID at least once in your development jo...
For further actions, you may consider blocking this person and/or reporting abuse
FYI A UUID method was added to NodeJS' core
crypto
module inv15.6.0
. So it's not available in the current LTS, butv16
takes over that role come October.New method's docs: nodejs.org/api/crypto.html#crypto_...
Hey, thank you for sharing that.
Hi, Bibek.
There is my benchmarking test crypto.randomUUID is three times faster uuid.v4. I hope you can use it as idea for your testings.
That's actually quite interesting. Thanks for sharing!
Hey Galkin, thank you for sharing that.
I use nanoid for anywhere I want identifiers that can easily be used in uris, especially ones that humans see. I've a postgresql UDF implementation that I can post about.
Yeah. That would be great.
Have been using it for a while now. Great little library 🔥
Yup. Very useful and reliable.
It would be great to compare Node.js Crypto module's UUID vs NanoID performance.
Hey, thank you for the suggestion. I will definitely try to do that.
Good stuff. Would you mind elaborating more details of why exactly nanoID is faster then UUID? What architectural changes helped nanoID improve it's speed?
Hey, I haven't done any in-depth research on both the packages, it's just the practical implementation. But as per
NanoID
's documentation, they are managing the memory in a better way, which makes them faster thanUUID
. You can check their benchmarks or you can test it by yourself too.This is nice and I will definitely use it my custom blog / portfolio project
I'm glad you liked it.
hate generating user id's, we already have to cope with naming things
Haha :-D
Thanks for sharing this, it really helped me out!
Thank you for your comment.
test