6 ms·
I have experience with profiling the `delete` keyword. It slows down post-deletion access to the parent object significantly. Generally, I avoid using it and in
by davej 11y ago
I have experience with profiling the `delete` keyword. It slows down post-deletion access to the parent object significantly. Generally, I avoid using it and instead set the value to `null`. Technically, this creates a memory-leak because the pointer remains but depending on the characteristics of your application it may be worth it.
The usual disclaimers of "profile it first" and "YMMV" apply, but it's useful to be aware of potential low hanging fruit when JS performance is critical to your application.