From: Jérôme Benoit Date: Mon, 11 Sep 2023 21:15:02 +0000 (+0200) Subject: perf: use node: prefix to bypass caching call for builtins X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9e6467bfb7bc5362bcac4ba0e00ab756c58702aa;p=benchmarks-js.git perf: use node: prefix to bypass caching call for builtins Signed-off-by: Jérôme Benoit --- diff --git a/benchmark-utils.mjs b/benchmark-utils.mjs index e914e6b..35515c5 100644 --- a/benchmark-utils.mjs +++ b/benchmark-utils.mjs @@ -1,4 +1,4 @@ -import crypto, { webcrypto } from 'crypto' +import crypto, { webcrypto } from 'node:crypto' /** * Generate a cryptographically secure random number in the [0,1[ range diff --git a/random.mjs b/random.mjs index e1062c0..2fff08e 100644 --- a/random.mjs +++ b/random.mjs @@ -1,4 +1,4 @@ -import crypto from 'crypto' +import crypto from 'node:crypto' import Benchmark from 'benny' import { secureRandom, diff --git a/uuid-generator.mjs b/uuid-generator.mjs index 92e15d8..f85005f 100644 --- a/uuid-generator.mjs +++ b/uuid-generator.mjs @@ -1,4 +1,4 @@ -import crypto from 'crypto' +import crypto from 'node:crypto' import Benchmark from 'benny' import { v4 as uuid } from 'uuid'