Hasty
.dev
Performance. Unbound.
New Benchmark
•
New Notebook
•
Shorts
Hasty
.dev
New Benchmark
•
New Notebook
•
Shorts
Shared Benchmark
Globals
const data = [ ...new Array(3500) ].map(Math.random)
Cases
Add case
0 ops/s
function mergeSort(arr){ const len = arr.length; if(len < 2) return arr; const mid = Math.floor(len/2); const left = arr.slice(0,mid); const right = arr.slice(mid); return merge(mergeSort(left),mergeSort(right)); } function merge(left, right){ const result = []; const lLen = left.length; const rLen = right.length; let l = 0; let r = 0; while(l < lLen && r < rLen){ if(left[l] < right[r]) result.push(left[l++]); else result.push(right[r++]); } return result.concat(left.slice(l)).concat(right.slice(r)); } mergeSort(data);
0 ops/s
function selectionSort(arr) { const len = arr.length; let minIdx; let temp; for (let i = 0; i < len; i++) { minIdx = i; for (let j = i + 1; j < len; j++) { if (arr[j] < arr[minIdx]) { minIdx = j; } } temp = arr[i]; arr[i] = arr[minIdx]; arr[minIdx] = temp; } return arr; } selectionSort(data);
Epochs:
Timeout:
Embed
Share
Options
Run
Shorts
Notebook Demo
Blog
Donate
Wall of love 😻
Popular
Telegram
Uptime
Bluesky
New Benchmark
New Notebook
HASTY.dev
Explore HASTY, your go-to platform for reliable JS benchmark tests. Improve your JavaScript performance and coding efficiency today by optimizing it.
https://techhub.social/@Mobilpadde
https://techhub.social/@Mobilpadde/112172445238616181
https://techhub.social/@Mobilpadde/112172445238616181