Skip to content

Cached checksumAddress #2652

Closed Answered by jxom
kyscott18 asked this question in Idea / Feature Request
Aug 23, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

checksumAddress already has an LRU cache.

https://github.com/wevm/viem/blob/main/src/utils/address/getAddress.ts#L34

How does this improve performance by 77x?

Update: I just realised that our LRU implementation doesn’t keep track of the keys touched to flush. Can update to fix.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kyscott18
Comment options

Answer selected by kyscott18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants