jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
getElementByIdの結果をキャッシュした場合の比較 http://d.hatena.ne.jp/namusyaka/20110304/1299228350 の計測データが一部おかしい感じがする。
<div id="test"></div>
<script>
var cache = {},
_d = document;
function $(id) {
return cache[id] || (cache[id] = _d.getElementById(id))
}
function _$(id) {
return _d.getElementById(id)
}
function qsa(id) {
return _d.querySelectorAll('#' + id)[0];
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
TEST1 |
| ready |
Test 2 |
| ready |
Test 3 |
| ready |
Test4 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.