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
for example, input string array ['a','b','c','d','e'] and new index array ['3','4','0','2','1'], expected output is ['c','e','d','a','b']
var list = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o'],
newIndexes = [3, 2, 9, 7, 24, 6, 13, 27, 17, 5, 14, 1, 23, 16, 4, 0, 10, 26, 12, 8, 11, 29, 21, 18, 15, 22, 19, 20, 28, 25];
Ready to run.
Test | Ops/sec | |
---|---|---|
move the elements in the array |
| ready |
create a new array and replace the original elements |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.