build(deps-dev): apply updates
[benchmarks-js.git] / uuid-generator.mjs
CommitLineData
f45b29bf 1import { randomUUID } from 'node:crypto'
0c01f51c 2
4676a95c 3import { bench, group, run } from 'tatami-ng'
f522d7b9 4import { v4 as uuid } from 'uuid'
5ae4976a 5
ab9a08f3
JB
6group('UUIDv4 generator', () => {
7 bench('randomUUID', () => {
f45b29bf 8 randomUUID()
ab9a08f3
JB
9 })
10 bench('uuid', () => {
5ae4976a 11 uuid()
5ae4976a 12 })
ab9a08f3
JB
13})
14
15await run({
ebf80fe4 16 units: true,
ab9a08f3 17})