Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Underscore each vs forEach 2
(version: 0)
Comparing performance of:
Underscore vs Native
Created:
4 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.0/underscore.js"></script>
Script Preparation code:
var data = [ 20, 25, 21, 24, 23, 39, 44, 33, 32, 31, 35, 28, 26, 29, 30, 36, 27, 3, 22, 47, 19, 15, 18, 34, 38, 2, 37, 40, 48, 46, 45, 41, 42, 43, 6, 1, 5, 16, 9, 17, 13, 14, 12, 8, 10, 11, 4, 7, ];
Tests:
Underscore
var result = _.map(data, (item, index) => { console.log(item); });
Native
var result = data.map((item, index) => { console.log(item); });
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Underscore
Native
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!
Related benchmarks:
Underscore Each vs Lodash Each vs Native forEach
Underscore.js _forEach() vs Native for loop for large arrays (rewrite)
Underscore each vs native foreach
Underscore each vs native object foreach
Underscore each v native object foreach
Comments
Confirm delete:
Do you really want to delete benchmark?