jsbench / jsbench.github.io

JavaScript benchmark playground
http://jsbench.github.io/
MIT License
266 stars 13 forks source link

show operation time / duration in nanoseconds #38

Open milahu opened 3 years ago

milahu commented 3 years ago

currently, only the operation frequency is displayed in operations per second = hertz

to me, getting the operation time feels more natural like code A needs 10 nanoseconds, code B needs 100 nanoseconds (smaller is better)

its just more intuitive than comparing 100.000 ops/sec vs 10.000 ops/sec (larger is better)

also, when you time different components of one larger program you can easily summarize the time-values

ideally make this optional, so we can switch between time and frequency maybe with a per-test preset config, stored in the github-gist