Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Underscore clone vs Underscore pick
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
underscore clone
2.0M/s
underscore pick
910K/s
View exact numbers
Test name
Executions per second
✓
underscore clone
1,979,910 Ops/sec
underscore pick
909,520 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js'></script>
Script Preparation code:
var MyObject = [{dateOfBirth_dateOfBirth: "babyBoomers", headcount: 644},{dateOfBirth_dateOfBirth: "genX", headcount: 605},{dateOfBirth_dateOfBirth: "millennial", headcount: 805}]; var myCopy = [];
Tests:
underscore clone
_.each(MyObject, function(d) { myCopy.push(_.clone(d)); });
underscore pick
_.each(MyObject, function(d) { myCopy.push(_.pick(d,['dateOfBirth_dateOfBirth','headcount'])); });