benchmark,lib: add process.hrtime.bigint benchmark · nodejs/node@f79cf70 · GitHub
Skip to content

Commit f79cf70

Browse files
addaleaxBridgeAR
authored andcommitted
benchmark,lib: add process.hrtime.bigint benchmark
Add a benchmark, and amend the relevant source code comment to state that currently, switching to directly returning a BigInt is not stopped by technical obstacles but rather the fact that using a typed array is actually a bit faster (about 2.5 %, measured locally). PR-URL: #26381 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 170e196 commit f79cf70

2 files changed

Lines changed: 28 additions & 17 deletions

File tree

benchmark/process/bench-hrtime.js

Lines changed: 26 additions & 15 deletions

lib/internal/process/per_thread.js

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)