Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
clones
(version: 1)
Benchmark.js
Comparing performance of:
json stringify vs structured clone vs lodash clone
Created:
one month ago
by:
Registered User
Go to the latest result
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:
const array = []; for (let i = 0; i < 1e5; i++) { array.push(i); }
Tests:
json stringify
const copy = JSON.parse(JSON.stringify(array));
structured clone
const copy = structuredClone(array);
lodash clone
const clone = _.cloneDeep(array);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
json stringify
structured clone
lodash clone
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
29 days ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36 OPR/136.0.0.0 (Edition developer)
Browser/OS:
Opera 136 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
structured clone
502/s
json stringify
365/s
lodash clone
140/s
View exact numbers
Test name
Executions per second
✓
structured clone
502 Ops/sec
json stringify
365 Ops/sec
lodash clone
140 Ops/sec
Related benchmarks
Test copy methods (primitive)
lodash clone vs structured clone
Comments
Confirm delete:
Do you really want to delete benchmark?