Closed jacoobes closed 1 year ago
In addition, there might be some better ways I'm thinking about to tackle cache cleanup after a dependency is removed 👯
The only reason for an object was typescript as it had a much better support for type inference. Do you see some performance problems related to deletion?
I haven't done full benchmarks for deletion but It's only an assumption it would be slower, so no i haven't add any problems
Practically, I don't think there are any lib users who use for delete heavy operations. But I might be wrong ¯_(ツ)_/¯
true ¯(°_o)/¯
But there are some other things I want to fix ^_^
Hi again,
From what I've read, using the
delete
operator is very slow. https://stackoverflow.com/questions/13982306/in-javascript-what-is-more-efficient-deleting-an-element-or-setting-it-to-undef.Would you ever consider another alternative, like setting deleted properties to undefined? In addition, is there a reason to not use a Map instead of an object?