Closed streamich closed 2 months ago
No thanks!
This is a zero dependency package, so the bar for accepting any changes like this is very high.
Besides that, I don't see how this is smaller (thingies
is double the entire size of this package, so ppl will be installing 3x what they currently are).
I also don't see how this is faster. The existing LruCache
implementation is 2x faster than thingies
' LruMap
at get()
calls and 4.4x faster at set()
calls.
This switches LRU implementation to the
LruMap
from thethingies
package, which is much smaller and should be faster.It uses native
Map
implementation and its feature thatMap.prototype.keys()
iterator always returns the items in FIFO order.The implementation pass all unit tests in the
fast.js
test suite.