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
Performance comparison between jshashtable implementation (http://www.timdown.co.uk/jshashtable/) vs. native javascript objects
<script src="//jshashtable.googlecode.com/files/jshashtable-2.1.js">
</script>
<script>
var jsobject = {};
var jshashtable = new Hashtable();
var sampleKey = Math.random().toString();
var sampleValue = Math.random().toString();
var initialSize = 1000000;
for (var index = 0; index < initialSize; index++) {
var key = Math.random().toString();
var val = Math.random().toString();
jsobject[key] = val;
jshashtable.put(key, val);
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
native object - create |
| ready |
jshashtable - create |
| ready |
native object - insert |
| ready |
jshashtable - insert |
| ready |
native object - get |
| ready |
jshashtable - get |
| ready |
native object - remove |
| ready |
jshashtable - remove |
| ready |
native object - each |
| ready |
jshashtable - each |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.