mirror of
https://github.com/hanzoai/uuid.git
synced 2026-09-24 17:04:02 +00:00
BREAKING CHANGE: Remove the minified UMD build from the package. Minified code is hard to audit and since this is a widely used library it seems more appropriate nowadays to optimize for auditability than to ship a legacy module format that, at best, serves educational purposes nowadays. For production browser use cases, users should be using a bundler. For educational purposes, today's online sandboxes like replit.com offer convenient ways to load npm modules, so the use case for UMD through repos like UNPKG or jsDelivr has largely vanished. Fixes #620
777 B
777 B
uuid Benchmark
npm install
Node.js
To run the benchmark in Node.js, run npm test.
Browser
To run the benchmark in the browser run npm run start, open benchmark.html, and check the console.
Example output ([email protected], MacBook Pro (Retina, 13-inch, Early 2015), 3.1 GHz Dual-Core Intel Core i7):
Starting. Tests take ~1 minute to run ...
uuidv1() x 1,306,861 ops/sec ±2.62% (85 runs sampled)
uuidv1() fill existing array x 4,750,515 ops/sec ±2.76% (88 runs sampled)
uuidv4() x 302,174 ops/sec ±3.06% (81 runs sampled)
uuidv4() fill existing array x 359,703 ops/sec ±3.67% (82 runs sampled)
uuidv3() x 105,667 ops/sec ±3.84% (79 runs sampled)
uuidv5() x 110,886 ops/sec ±2.55% (81 runs sampled)
Fastest is uuidv1() fill existing array