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
Comparing speed and efficiency of looking for certain values in array by different methods.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script>
var questions = [
{
"answerString": "Yes",
"text": 1510
},{
"answerString": "No",
"text": 1511
},{
"answerString": "45",
"text": 2227
},{
"answerString": "Female",
"text": 2228
},{
"answerString": "Yes",
"text": 1510
},{
"answerString": true,
"text": 3514
},{
"answerString": false,
"text": 3545
}
];
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Grep |
| ready |
Map |
| ready |
Each |
| ready |
For |
| ready |
ForIn |
| ready |
While |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.