Developer releases jet-id, a JavaScript ID generator 60% faster than nanoid
A developer has released jet-id, a zero-dependency unique ID generator for JavaScript and TypeScript that benchmarks at roughly 83 million IDs per second, compared to nanoid's 52 million. Each ID is a 28-character Crockford base32 string containing 125 random bits, with an optional timestamped variant that enables sorting by creation time. The library achieves its speed through techniques such as bulk ID pooling, lookup tables that encode two characters at once, and processing four bytes at a time via Uint32Array. The project originated from the developer's personal need for a Crockford-alphabet ID generator with optional timestamping for a web database column. At just 6.4 kB packed, jet-id works across Node.js and modern browsers and is available via npm.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in