Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash omit vs Native object destruction vs delete
(version: 1)
Comparing performance of:
Native object desctruction vs Lodash omit vs delete vs delete (without affecting the original object)
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js"></script>
Script Preparation code:
var object = { 'a': 1, 'b': '2', 'c': 3 };
Tests:
Native object desctruction
var { a, c, ...result2 } = object; return result2
Lodash omit
return _.omit(object, ['a', 'c']);
delete
delete object.a; delete object.c; return object;
delete (without affecting the original object)
var newObject = { ...object }; delete newObject.a; delete newObject.c; return newObject;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
Native object desctruction
Lodash omit
delete
delete (without affecting the original object)
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?