From 9e6467bfb7bc5362bcac4ba0e00ab756c58702aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 11 Sep 2023 23:15:02 +0200 Subject: [PATCH] perf: use node: prefix to bypass caching call for builtins MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- benchmark-utils.mjs | 2 +- random.mjs | 2 +- uuid-generator.mjs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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' -- 2.34.1