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="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<a class="perf-test" href="http://net.tutsplus.com">Hi</a>
<a class="perf-test" href="http://net.tutsplus.com">Hi</a>
<a class="perf-test" href="http://net.tutsplus.com">Hi</a>
<a class="perf-test" href="http://net.tutsplus.com">Hi</a>
<a class="perf-test" href="http://net.tutsplus.com">Hi</a>
<a class="perf-test" href="http://net.tutsplus.com">Hi</a>
<a class="perf-test" href="http://net.tutsplus.com">Hi</a>
<a class="perf-test" href="http://net.tutsplus.com">Hi</a>
<a class="perf-test" href="http://net.tutsplus.com">Hi</a>
<a class="perf-test" href="http://net.tutsplus.com">Hi</a>
<a class="perf-test" href="http://net.tutsplus.com">Hi</a>
<script>
(function() {
function changeColor($this, value) {
$this.css({
color: value
});
}
$.fn.myPlugin = function(options) {
return this.each(function() {
var $this = $(this);
changeColor($this, options.color);
});
};
}());
(function() {
$.fn.myPlugin2 = function(options) {
return this.each(function() {
var $this = $(this);
function changeColor() {
$this.css({
color: options.color
});
}
changeColor();
});
};
}());
(function() {
$.fn.myPlugin3 = (function() {
var changeColor = function($this, value) {
$this.css({
color: value
});
};
return function(options) {
return this.each(function() {
var $this = $(this);
changeColor($this, options.color);
});
}
}());
}());
var $els = $(".perf-test");
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Optimized |
| ready |
Unoptimized |
| ready |
With closure |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.