Closed Xon closed 6 years ago
Can you link me to a reference for this optimization?
In a loop, there is a noticeable performance difference; https://jsperf.com/delete-vs-undefined-vs-null/16
A V8 developer mentions using delete will likely be slow; https://stackoverflow.com/questions/43594092/slow-delete-of-object-properties-in-js-in-v8 https://groups.google.com/forum/#!topic/v8-users/zE4cOHBkAnY
Well, none of these delete
s are in any loops, so this won't affect performance. But you're right, it does appear to be best practice to avoid delete
if possible. Merge approved.
Mostly minor, as the flags aren't mutated that often.