Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
array vs frozen array loop
(version: 0)
Comparing performance of:
normal array vs frozen array
Created:
one year ago
by:
Registered User
Jump to the latest result
Script Preparation code:
var a = [ /@atlassian\/parcel/, /@parcel\//, /@oxc-resolver\/.+/, ]; var b = Object.freeze([ /@atlassian\/parcel/, /@parcel\//, /@oxc-resolver\/.+/, ]);
Tests:
normal array
for (const matcher of a) { if (matcher.test("SOMETHING")) { return 'yes'; } return 'no' }
frozen array
for (const matcher of b) { if (matcher.test("SOMETHING")) { return 'yes'; } return 'no' }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
normal array
frozen array
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Browser/OS:
Chrome 130 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
normal array
11036072.0 Ops/sec
frozen array
8346339.5 Ops/sec
Related benchmarks:
swddddddddddddddddddd
Array loop vs foreach vs map vs for of wit entries
set.has vs. array.includes 1e5
Find in array - 002
Find in array - 003
Find in array - 004
set.has vs. array.includes v2
for-of-vs-map
mutate-vs-map
Comments
Confirm delete:
Do you really want to delete benchmark?