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="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://documentcloud.github.com/underscore/underscore.js"></script>
<script>
(function() {
var hasOwnProperty = {}.hasOwnProperty,
toString = {}.toString.call;
_.mixin({
// Is a given variable an arguments object?
isArgumentsNew: toString(arguments) == '[object Arguments]'
? function(obj) {
return toString(obj) == '[object Arguments]';
}
: function(obj) {
return !!(obj && hasOwnProperty.call(obj, 'callee'));
},
// Is a given value a function?
isFunctionNew: function(obj) {
return toString(obj) == '[object Function]';
},
// Is a given value a string?
isStringNew: function(obj) {
return toString(obj) == '[object String]';
},
// Is a given value a number?
isNumberNew: function(obj) {
return toString(obj) == '[object Number]';
},
// Is a given value a date?
isDateNew: function(obj) {
return toString(obj) == '[object Date]';
},
// Is the given value a regular expression?
isRegExpNew: function(obj) {
return toString(obj) == '[object RegExp]';
}
});
}());
</script>
var $ = window.jQuery,
_ = window._,
array = [1, 2, 3],
func = function(){},
string = "string",
number = 101,
date = new Date,
regexp = /regexp/i;
Ready to run.
Test | Ops/sec | |
---|---|---|
Current Implementation |
| ready |
Proposed Implementation |
| ready |
Sanity Check |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.