-
Notifications
You must be signed in to change notification settings - Fork 169
Open
Description
What feature should we add?
In some contexts, such as usage in modules that are meant to load super fast, importing from eth-utils becomes a little bottleneck.
In [1]: %time from eth_utils import to_checksum_address
CPU times: user 175 ms, sys: 9.1 ms, total: 184 ms
Wall time: 183 ms
Comparing it to Pydantic for no reason.
In [2]: %time from pydantic import BaseModel
CPU times: user 54.2 ms, sys: 7.14 ms, total: 61.3 ms
Wall time: 60.4 ms
I am just softly wondering if we can put forth some efforts to making this import faster.
Use-case:
- Using in modules for CLI tools, which should load super fast so that using
--helpand such is fast. - Using in exceptions, logging, or other utils modules, which are somewhat expected to load fast.
Workaround
Can use localized imports, but that comes with other problems
kclowes
Metadata
Metadata
Assignees
Labels
No labels