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
Double checking the additional hasOwnProperty check so that the tests are equivalent
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js">
</script>
<script>
var obj =
{
},
i = 0,
keys = ["loremFistrumQue", "diseUsteerTe", "vaAHasePupita", "deLa", "praderaCaballoBlanco", "caballoNegroorlTe", "teVoyABorrarelCerito", "benemeritaarFistrodela", "praderaAlAtaquerldeLapradera", "tieneMushoPeligro", "aPeichDiodenoo", "caballoBlanco", "caballoNegroorl", "seCalleUstee"]
</script>
i = 0;
Ready to run.
Test | Ops/sec | |
---|---|---|
for…in |
| ready |
Object.keys |
| ready |
Predefined array of keys |
| ready |
for..in no hasOwnProperty |
| ready |
lodash forOwn |
| ready |
lodash forIn |
| ready |
lodash forEach |
| ready |
for in (no hasprop) |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.