Closed gurgunday closed 8 months ago
Reference: https://github.com/kibertoad/toad-cache/issues/40 Benchmark: https://github.com/kibertoad/nodejs-benchmark-tournament/pull/12
TLDR, I've discovered a 50%+ improvement in the lookup performance of non-numeric keys when a map is used instead of an object
In rate-limit, the key of a request is by default its IP address, so we should benefit directly from the change
rate-limit
Reference: https://github.com/kibertoad/toad-cache/issues/40 Benchmark: https://github.com/kibertoad/nodejs-benchmark-tournament/pull/12
TLDR, I've discovered a 50%+ improvement in the lookup performance of non-numeric keys when a map is used instead of an object
In
rate-limit
, the key of a request is by default its IP address, so we should benefit directly from the change