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 native, bubble, insertion, selection, merge, and quick sort algorithms on a random array.
<script src="https://raw.github.com/idosela/algorithms-in-javascript/master/common.js">
</script>
<script src="https://raw.github.com/idosela/algorithms-in-javascript/master/bubble-sort.js">
</script>
<script src="https://raw.github.com/idosela/algorithms-in-javascript/master/insertion-sort.js">
</script>
<script src="https://raw.github.com/idosela/algorithms-in-javascript/master/merge-sort.js">
</script>
<script src="https://raw.github.com/idosela/algorithms-in-javascript/master/quick-sort.js">
</script>
<script src="https://raw.github.com/idosela/algorithms-in-javascript/master/selection-sort.js">
</script>
// Generate array with 10,000 random integers.
var unsortedTestArray = [];
for (var i = 0; i < 1000000; i++) {
unsortedTestArray.push(Math.floor(Math.random()*100000));
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Native |
| ready |
BubbleSort |
| ready |
InsertionSort |
| ready |
SelectionSort |
| ready |
MergeSort |
| ready |
QuickSort |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.