mhart / aws4

Signs and prepares Node.js requests using AWS Signature Version 4
MIT License
703 stars 176 forks source link

Use faster smaller LRU cache from `thingies` package #170

Closed streamich closed 2 months ago

streamich commented 2 months ago

This switches LRU implementation to the LruMap from the thingies package, which is much smaller and should be faster.

It uses native Map implementation and its feature that Map.prototype.keys() iterator always returns the items in FIFO order.

The implementation pass all unit tests in the fast.js test suite.

mhart commented 2 months ago

No thanks!

mhart commented 2 months ago

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.