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
Increasing Triplet Subsequence
const increasingTriplet = function(nums) {
let currNum = 0;
let nextNum = 0;
let lastNum = 0;
let bool = false;
for (let i = 0; i < nums.length; i++) {
currNum = nums[i];
nextNum = nums[i + 1];
lastNum = nums[i + 2];
if (currNum < nextNum && nextNum < lastNum) {
bool = true;
}
}
return bool;
};
Ready to run.
Test | Ops/sec | |
---|---|---|
Test 1 |
| ready |
Test 2 |
| ready |
Test 3 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.