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
<script src="//code.jquery.com/jquery-2.1.1.min.js">
</script>
<script src="//rawgit.com/lodash/lodash/master/lodash.js">
</script>
this.__num = 1;
var nativeBind = (function(x) {
return this.__num + x;
}).bind(this);
var jqProxy = jQuery.proxy(function(x) {
return this.__num + x;
}, this);
var lodashBind = _.bind(function(x) {
return this.__num + x;
}, this);
var that = this;
var withoutBind = function(x) {
return that.__num + x;
};
Ready to run.
Test | Ops/sec | |
---|---|---|
Native bind |
| ready |
jQuery.proxy |
| ready |
Underscore.js bind |
| ready |
Without bind |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.