Skip to content

Commit 6f092f6

Browse files
Claude Codeclaude
andcommitted
Increase precision to 4 decimal places for benchmark values
Updated formatNumber function to round to 4 decimal places instead of 2, providing more precise timing measurements for fast operations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 631dc24 commit 6f092f6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/format-benchmarks.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ function addCommas(num) {
88
return addCommas(str.slice(0, -3)) + ',' + str.slice(-3);
99
}
1010

11-
function formatNumber(num, decimals = 2) {
12-
return (Math.round(num * 100) / 100).toString();
11+
function formatNumber(num, decimals = 4) {
12+
const multiplier = Math.pow(10, decimals);
13+
return (Math.round(num * multiplier) / multiplier).toString();
1314
}
1415

1516
function formatBenchmarkResults(jsonFile) {

0 commit comments

Comments
 (0)