| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| mitata november update source code.tar.gz | 2024-11-20 | 26.2 kB | |
| mitata november update source code.zip | 2024-11-20 | 33.8 kB | |
| README.md | 2024-11-20 | 3.4 kB | |
| Totals: 3 Items | 63.3 kB | 0 | |
π οΈ Changes
groups can have names
:::js
group(name, () => {
...
});
β’ math
-------------------------------------------
1 + 1 87.43 ps/iter
(51.03 ps β¦ 9.83 ns)
charts/visualizations can be nested and combined
:::js
summary(() => {
barplot(() => {
bench(...);
});
barplot(() => { ... });
});
------------------------------------------- -------------------------------
1 + 1 105.54 ps/iter 91.55 ps β β !
(61.04 ps β¦ 1.83 Β΅s) 122.07 ps βββββββββββββββββββββ
Date.now() 39.61 ns/iter 28.01 ns β
(27.83 ns β¦ 3.19 Β΅s) 153.12 ns βββββββββββββββββββββ
β β
1 + 1 β€ 105.54 ps
Date.now() β€β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β 39.61 ns
β β
summary
1 + 1
375.26x faster than Date.now()
------------------------------------------- -------------------------------
2 + 2 117.75 ps/iter 91.55 ps β β !
(61.04 ps β¦ 3.69 Β΅s) 112.06 ps βββββββββββββββββββββ
3 + 3 126.97 ps/iter 91.55 ps β β !
(61.04 ps β¦ 4.23 Β΅s) 122.07 ps βββββββββββββββββββββ
β β
2 + 2 β€ 117.75 ps
3 + 3 β€β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β 126.97 ps
β β
summary
2 + 2
1.08x faster than 3 + 3
other notable changes
- support for detecting webcontainers
- benchmark names now have 28 chars of space
- optimized amount of ansi codes outputted in some charts
π New Features
benchmark names can be highlighted
:::js
bench(...).highlight('red');
markdown table format
:::js
await run({ format: 'markdown' });
clk: ~3.17 GHz cpu: Apple M2 Pro runtime: bun 1.1.26 (arm64-darwin)
| benchmark | avg | min | p75 | p99 | max |
|---|---|---|---|---|---|
| 1 + 1 | 90.69 ps/iter |
61.04 ps |
91.55 ps |
122.07 ps |
309.74 ns |
| Date.now() | 28.70 ns/iter |
26.70 ns |
28.01 ns |
43.35 ns |
413.05 ns |
option to fine tune garbage collection behavior
:::js
// runs gc before each iteration
bench(...).gc('inner');