Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
underscore js
(version: 0)
native vs underscore
Comparing performance of:
underscore vs native js
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.13.0/underscore.js"></script>
Script Preparation code:
var data = _.range(10000).map(function(i) { return { counter: i } }); function isOdd(num) { return num % 2 === 1; } function square(num) { return num * num; } function lessThanThreeDigits(num) { return num.toString().length < 3; }
Tests:
underscore
var result = _.chain(data) .map(item => item.counter) .filter(isOdd) .map(square) .filter(lessThanThreeDigits) .value();
native js
var result = data.map(item => item.counter) .filter(isOdd) .map(square) .filter(lessThanThreeDigits)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
underscore
native js
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Mobile Safari/537.36
Browser/OS:
Chrome Mobile 124 on Android
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
underscore
613.6 Ops/sec
native js
522.2 Ops/sec
Related benchmarks:
Lodash vs Ramda vs Underscore 1.9.0 - IE11 Compatible with vanilla
Underscore vs native
Lodash vs Ramda vs Underscore 1.9.0 vs native
Underscore 1.6 vss Underscore 1.9
Comments
Confirm delete:
Do you really want to delete benchmark?