3 ms·
I'm not a v8 expert, but if instead of delete this.indexes; wouldn't the author avoid the performance regression with this.indexes = 0; and still av
by terinjokes 11y ago
I'm not a v8 expert, but if instead of
delete this.indexes;
wouldn't the author avoid the performance regression with
this.indexes = 0;
and still avoid external state?
- arcatek 11y agoProbably (or maybe by setting `null` .. i'm not sure how engines deal with changing data types). `delete` implies that the underlying object schema has to change. It's an heavy operation.
- DiThi 11y agoExactly what I thought, but with "null" instead (or better, an empty version of whatever was there).