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
var x
var array_of_ints = [0, 1, 2, 3, 4, 5]
var array_of_floats = [0.1, 1.1, 2.1, 3.1, 4.1, 5.1]
var array_of_strings = ['0', 'one', 'twotwo', 'threethreethree', 'fourfourfourfour', 'fivefivefivefivefive']
var array_of_bools = [true, true, false, false, true]
var array_of_arrays = [[1,2,3], [1,2,3], [1,2,3]]
var array_of_int_float = [0, 1.1, 2, 3.1, 4, 5.1]
var array_of_int_string = [0, '1', 2, '3', 4, '5']
var array_of_float_string = [0.1, '1', 2.1, '3', 4.1, '5']
var array_of_mixed = [0, 1.1, '2', false, [1,2,3]]
var array_of_objects = [{foo: 0}, {bar: 1}, {alt: 2}, {alpha: false}, {arr: [1,2,3]}]
function read_array(input) {
for (var i = 0; i < input.length; i++) {
x = input[i]
}
}
Ready to run.
Test | Ops/sec | |
---|---|---|
array of floats |
| ready |
array of ints |
| ready |
array of strings |
| ready |
array of bools |
| ready |
array of int and float |
| ready |
array of int and string |
| ready |
array of float and string |
| ready |
array of mixed |
| ready |
array of arrays |
| ready |
array of objects |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.