Conversation
|
Thank you soo much! |
|
I have 1 day cold-down (to reduce supply chain attack risks). I temporary disable the cold-down for The current results are from CI: Is it correct? It is more about 10% (please review the benchmark, maybe I am doing something wrong). When you will add more tools to the benchmark in nope-id docs I will be ready to merge it. |
|
@ai Thank you, this is really kind, and thank you for actually wiring nope-id into the benchmark. Short version: your benchmark is correct, you are not doing anything wrong. The numbers are lower on your CI purely because of the hardware. I ran your exact harness (tinybench, Node 26) on my MacBook M2 and put it next to your CI run:
Same code, same benchmark, same Node, so the only variable is the CPU: a dedicated Apple M2 (ARM) versus a shared, virtualized 2-vCPU Linux runner. Everything is ~1.4 to 2x faster on my machine, which is why nope-id reads ~9M locally and ~5.6M on your CI. Absolute ops/sec is only meaningful within the same run. In both runs nope-id was the faster of the two: ~19% ahead on my M2 (9.2M vs 7.8M) and ~3% ahead on your CI (5.57M vs 5.41M). It is never the slower one here; the margin just grows on a faster CPU, where nope-id's per-character work pays off more, and compresses under CI noise. So for URL-safe IDs nope-id keeps nanoid-class speed on modest hardware and pulls clearly ahead on capable hardware, while nanoid stays an excellent, well-designed library. To be precise about where that speed is: among JavaScript libraries that emit a CSPRNG-backed, URL-safe id over a full 64-character alphabet (the nanoid niche), nope-id is the fastest, and it also generates UUIDv7 and ULID far faster than the dedicated On your request: I have expanded nope-id's own benchmark to compare against more tools, now including Thanks again. |
|
Done! =^_^= |
cc @orhanayd