Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Sort Speed Chrome
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Browser:
Chrome 128
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
basic sort
106/s
default sort
99/s
View exact numbers
Test name
Executions per second
✓
basic sort
106 Ops/sec
default sort
99 Ops/sec
Script Preparation code:
var length = 1000000 var array = new Array(length / 2).fill().map(() => Math.round(Math.random() * length)) array = array.concat(array) array.unshift(length + 1) var defaultSort = [...array] var basicSort = [...array]
Tests:
default sort
defaultSort.sort()
basic sort
basicSort.sort((a,b) => a-b)