Skip to content

Commit 8ba2319

Browse files
authored
bench: add @napi-rs/uuid v4 (#333)
1 parent f425778 commit 8ba2319

File tree

3 files changed

+133
-0
lines changed

3 files changed

+133
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@babel/core": "^7.16.7",
3535
"@logux/eslint-config": "^46.1.1",
3636
"@lukeed/uuid": "^2.0.0",
37+
"@napi-rs/uuid": "^0.2.0",
3738
"@originjs/vite-plugin-commonjs": "^1.0.2",
3839
"@size-limit/dual-publish": "^7.0.5",
3940
"@size-limit/file": "^7.0.5",

pnpm-lock.yaml

Lines changed: 128 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/benchmark.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
let { uid: uidSecure } = require('uid/secure')
44
let { v4: lukeed4 } = require('@lukeed/uuid')
5+
let { v4: napiv4 } = require('@napi-rs/uuid')
56
let { v4: uuid4 } = require('uuid')
67
let benchmark = require('benchmark')
78
let shortid = require('shortid')
@@ -32,6 +33,9 @@ suite
3233
.add('crypto.randomUUID', () => {
3334
crypto.randomUUID()
3435
})
36+
.add('@napi-rs/uuid', () => {
37+
napiv4()
38+
})
3539
.add('uid/secure', () => {
3640
uidSecure(32)
3741
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy