|
|
|
|
|
by Cthulhu_
1392 days ago
|
|
Microbenchmarks are only valid for the one function under test, and only on the current machine; they're all right for optimizing on particular hardware, but not so much to go out into the world and go "X is faster than Y" That said, I did like this website where you could set up JS benchmarks, they would run on your own machine and you could compare how it ran on other people's systems. It wasn't perfect, but it gave a decent indication if X was faster than Y. Of course, it's a snapshot in time, JS engines have gone through tons of optimizations over the years. |
|
If you only call this function once in a while, then the context is more important than the function.
You can only ignore the context when you do video decoding or matrix inversion or similar "context free" long running code.