Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Sort vs ToSorted test
(version: 1)
test
Comparing performance of:
sort vs toSorted
Created:
11 months ago
by:
Guest
Jump to the latest result
Script Preparation code:
const element = [{foo: 100}, {foo:200}, {foo: 50}]
Tests:
sort
const element = [{foo: 100}, {foo:200}, {foo: 50}] const result = element.sort((a,b) => a.foo - b.foo)
toSorted
const element = [{foo: 100}, {foo:200}, {foo: 50}] 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:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?