Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
array some vs _.some III
(version: 0)
Comparing performance of:
_.some vs array.some
Created:
5 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.core.js"></script>
Script Preparation code:
var incidents = [ { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "POSTPONED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "ASSIGNED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "POSTPONED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "ASSIGNED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "POSTPONED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "ASSIGNED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "POSTPONED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "ASSIGNED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "POSTPONED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "ASSIGNED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "POSTPONED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "ASSIGNED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "COMPLETED" } }, { incident: {}, incidentStatus: { statusType: "NEW" } }, ]
Tests:
_.some
_.some(incidents, i => i.incidentStatus.statusType === "NEW")
array.some
incidents.some(i => i.incidentStatus.statusType === "NEW")
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
_.some
array.some
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!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
Based on the provided input, I will create a benchmark test using Lodash and JavaScript. **Benchmark Test** ```javascript const _ = require('lodash'); const incidents = [ { incident: {}, incidentStatus: { statusType: 'NEW' } }, // ... other incidents ... ]; console.time('_.some'); _.some(incidents, (i) => i.incidentStatus.statusType === 'NEW'); console.timeEnd('_.some'); console.time('array.some'); incidents.some((i) => i.incidentStatus.statusType === 'NEW'); console.timeEnd('array.some'); ``` **Benchmark Configuration** ```javascript const options = { // Set the number of executions for each test executions: 1000, // Set the timeout for the benchmark (in milliseconds) timeout: 5000, }; ``` **Test Results** | Test Name | RawUAString | Browser | DevicePlatform | OperatingSystem | ExecutionsPerSecond | | --- | --- | --- | --- | --- | --- | | _.some | ... | Firefox 79 | Desktop | Ubuntu | 2938410.75 | | array.some | ... | Firefox 79 | Desktop | Ubuntu | 1726433.25 | Note: The RawUAString, Browser, DevicePlatform, and OperatingSystem columns are not relevant for this specific benchmark test. Please let me know if you'd like to modify or add anything to the benchmark test.
Related benchmarks:
Loop perf
lodash_array_objects
lodash_array_objects_2
Destructuring vs Dot notation
Comments
Confirm delete:
Do you really want to delete benchmark?