(s: number)
| 101 | // ================================================================ |
| 102 | |
| 103 | function formatSpeedup(s: number): string { |
| 104 | if (s >= 1) return `\x1b[32m${s.toFixed(1)}x faster\x1b[0m`; |
| 105 | return `\x1b[31m${(1 / s).toFixed(1)}x slower\x1b[0m`; |
| 106 | } |
| 107 | |
| 108 | function formatMs(ms: number): string { |
| 109 | if (ms < 0.001) return `${(ms * 1000).toFixed(1)}µs`; |
no test coverage detected