{"id":16678481,"url":"https://github.com/2fd/benchmark-uuid","last_synced_at":"2026-04-27T09:02:15.810Z","repository":{"id":189818501,"uuid":"681363736","full_name":"2fd/benchmark-uuid","owner":"2fd","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-20T15:08:41.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-13T07:13:45.167Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2fd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-21T21:15:36.000Z","updated_at":"2023-09-04T13:12:35.000Z","dependencies_parsed_at":"2023-08-21T22:49:03.813Z","dependency_job_id":"76e1852b-3ae0-4c53-9a07-42f70b0a665d","html_url":"https://github.com/2fd/benchmark-uuid","commit_stats":null,"previous_names":["2fd/benchmark-uuid"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/2fd/benchmark-uuid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2fd%2Fbenchmark-uuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2fd%2Fbenchmark-uuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2fd%2Fbenchmark-uuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2fd%2Fbenchmark-uuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2fd","download_url":"https://codeload.github.com/2fd/benchmark-uuid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2fd%2Fbenchmark-uuid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32329466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T13:29:26.555Z","updated_at":"2026-04-27T09:02:15.766Z","avatar_url":"https://github.com/2fd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# benchmark-uuid\n\n[![Benchmark](https://github.com/2fd/benchmark-uuid/actions/workflows/benchmark.yml/badge.svg?branch=master)](https://github.com/2fd/benchmark-uuid/actions/workflows/benchmark.yml)\n\nThis benchmark is used to compare the performance of different UUID v4 implementations in NodeJS.\n\n- [`node node.js`](./node.js)\n- [`node browser.js`](./browser.js)\n- [`node uuid3.js`](./uuid3.js)\n- [`node uuid7.js`](./uuid7.js)\n- [`node uuid8.js`](./uuid8.js)\n- [`node uuid9.js`](./uuid9.j)\n\n## Usage\n\n```sh\n  npm start\n```\n\n## Results\n\nNodeJS implementation (`import { randomUUID } from 'crypto'`), Web implementation (`crypto.randomUUID`) and uuid@9 (`import { v4 } from 'uuid'`) are indistinguishable in performance, while uuid@8 is 10x slower and uuid@7 and uuid@3 are 40x slower.\n\n### Node 16\n\n```txt\n'node node.js' ran\n    1.02 ± 0.05 times faster than 'node browser.js'\n    1.03 ± 0.04 times faster than 'node uuid9.js'\n   10.10 ± 0.38 times faster than 'node uuid8.js'\n   43.10 ± 1.73 times faster than 'node uuid7.js'\n   43.27 ± 1.70 times faster than 'node uuid3.js'\n```\n\n### Node 18\n\n```txt\n'node browser.js' ran\n    1.01 ± 0.01 times faster than 'node node.js'\n    1.04 ± 0.01 times faster than 'node uuid9.js'\n    9.07 ± 0.17 times faster than 'node uuid8.js'\n   36.48 ± 0.31 times faster than 'node uuid3.js'\n   36.56 ± 0.42 times faster than 'node uuid7.js'\n```\n\n### Node 20\n\n```txt\n  'node browser.js' ran\n    1.00 ± 0.01 times faster than 'node node.js'\n    1.03 ± 0.01 times faster than 'node uuid9.js'\n   12.30 ± 0.10 times faster than 'node uuid8.js'\n   52.17 ± 0.72 times faster than 'node uuid3.js'\n   52.75 ± 0.79 times faster than 'node uuid7.js'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2fd%2Fbenchmark-uuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2fd%2Fbenchmark-uuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2fd%2Fbenchmark-uuid/lists"}