Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Lodash Deep Copy2
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:128.0) Gecko/20100101 Firefox/128.0
Browser:
Firefox 128
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Lodash copydeep
463.6 Ops/sec
Spread operator
265608.8 Ops/sec
HTML Preparation code:
<!--your preparation HTML code goes here--> <script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js'></script>
Script Preparation code:
var arr = new Array(1000).fill(null).map(() => ({ id: Math.random(), event_id: `evt_${Math.random()}`, calendar_id: `cal_${Math.random()}`, event_json: { title: "Test Event", description: "Test Description", startDate: "2024-01-01", endDate: "2024-01-02", location: { address: "123 Test St", lat: 44.4582983, lng: -93.1616132 }, attendees: [ { email: "test1@test.com", response: "accepted" }, { email: "test2@test.com", response: "pending" } ] }, is_latest: 1, start_date: "2024-01-01", end_date: "2024-01-02" }));
Tests:
Lodash copydeep
myCopy = _.cloneDeep(arr);
Spread operator
myCopy = [...arr];