Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
structuredClone vs Immer Produce on medium objects
(version: 1)
Comparing performance of:
Produce vs CloneDeep
Created:
6 months ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/immer@3.1.3/dist/immer.umd.min.js"></script>
Script Preparation code:
const obj = { data: { data1: { nested1: 'test' nested2: 'test' nested3: 'test' nested4: 'test' } }, data2: { nested1: 'test' nested2: 'test' nested3: 'test' nested4: { nested1: 'test' nested2: 'test' nested3: 'test' nested4: 'test' } } data3: { nested1: 'test' nested2: 'test' nested3: 'test' nested4: { nested1: 'test' nested2: 'test' nested3: 'test' nested4: 'test' } } };
Tests:
Produce
const result = immer.produce(state, draft => { draft.data.data1.data2 = 'updated' })
CloneDeep
const result = _.cloneDeep(state); result.data.data1.data2 = 'updated';
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Produce
CloneDeep
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!
Comments
Confirm delete:
Do you really want to delete benchmark?