It is common advise to nullify a prop value within an object rather than deleting the prop. Should you prefer one over the other? Especially, in performance intensive applications.
Delete object prop
What do you do when you do not need a key-value pair in an object? Why, we simply delete it, of course.
Except that the compiler/interpreter has to do so much extra work to delete a prop within an object. When the object changes, Javascript will recompile “associated” code internal to the compiler and reset things are required. This requires more computation and time - especially if you have large number of elements.
At least, in theory.
What you can do instead - null the prop
You can set key value to undefined or null in the object.
The quick and dirty test does not reveal anything significant in a set of elements in a loop - but surprisingly delete is better than nullifying a prop value.
Let us transfer the time measurement to the individual transactions rather than the entire loop. We will take an average of all observed times to output average performance.