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
Who's faster to delete an element from an array, underscore's without method or implementation of Array remove method ?
<script src="//underscorejs.org/underscore-min.js"></script>var arr = _.range(100000);
var arr2 = _.range(100000);
var i = 0;
var j = 0;
Array.prototype.remove = function(from, to) {
var rest = this.slice((to || from) + 1 || this.length);
this.length = from < 0 ? this.length + from : from;
return this.push.apply(this, rest);
};Ready to run.
| Test | Ops/sec | |
|---|---|---|
| _.without | | ready |
| Array.prototype.remove | | ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.