-
Notifications
You must be signed in to change notification settings - Fork 428
Open
Description
In the future, when the CLZ
opcode https://eips.ethereum.org/EIPS/eip-7939 is added, many algorithms in Solady can be drastically improved upon.
Libraries such as LibBit
, LibBytes
, LibString
, FixedPointMathLib
, LibZip
can see a dramatic speedup.
CLZ
can be the highest impact improvement to accelerate the EVM for the next 2 years:
- More so than transient storage (can be substituted with using warm slots).
- More so than PUSH0 (can be substituted with other 2 gas opcodes).
LibZip.cdCompress
will be more widely used to pack storage automatically. This usesCLZ
repeatedly.
To enable maximum support and backwards compatibility:
- Once the
CLZ
opcode appears on mainnet, the corresponding library will be in thefuture
directory (e.g.utils/future
). - Let's also take the opportunity to introduce stuff like
MCOPY
(e.g. for insertion sort). - When most L2s have the
CLZ
opcode, we may decide to move the libraries fromfuture
into the actual directory. Then, the nonCLZ
libraries will be moved into thelegacy
directory.
MuhtasimTanmoy, atarpara, legion2002, JhChoy, 0xbrito and 2 more
Metadata
Metadata
Assignees
Labels
No labels