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
Testing Object.keys vs for-in. I see that SlickGrid uses objects with indexed keys rather than arrays. Confused....
var X = function() {
this.x = 1;
this.y = 4;
};
var data = [
{foo: 'bar', bar: null, d: 3, f: 20, g: 30},
{bar: null, 12312312: 30},
new X(),
{bar: null, 12312312: 30},
new X(),
{foo: 'bar', bar: null, d: 3, f: 20, g: 30}
];
var ownProp = Object.prototype.hasOwnProperty;
Ready to run.
Test | Ops/sec | |
---|---|---|
for-in |
| ready |
object.keys |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.