Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
sort sorted
(version: 1)
Comparing performance of:
sort vs toSorted
Created:
24 days ago
by:
Guest
Jump to the latest result
Tests:
sort
const element = [{foo: 100}, {foo:200}, {foo: 50}, {foo: 20}, {foo: 90}] const result = [...element].sort((a,b) => a.foo - b.foo)
toSorted
const element = [{foo: 100}, {foo:200}, {foo: 50}, {foo: 20}, {foo: 90}] const result = element.toSorted((a,b) => a.foo - b.foo)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
sort
toSorted
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
24 days ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
Browser/OS:
Chrome 148 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
sort
9575441.0 Ops/sec
toSorted
9442792.0 Ops/sec
Related benchmarks:
Length Check Sort vs Empty Sort
sorting speed
Sort vs ToSorted
[...array].sort vs array.toSorted
Sort vs ToSorted 222
[...array].sort vs array.toSorted short array
array.sort vs array.toSorted (2)
[...array].sort vs [...array].toSorted
Sort vs ToSorted 100k
Comments
Confirm delete:
Do you really want to delete benchmark?