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
Is it faster to remove an item from an array (and thus allow the indices to be renumbered) or delete a property from an object. Also, checking deletion from array, but this does not renumber the indices so may not be preferable.
<script>
var someArr = [4, 5, 6];
var someObj = {
a: 4,
b: 5,
c: 6
};
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Splice |
| ready |
Object Delete |
| ready |
Array Delete |
| ready |
Object sub-script Delete |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.