You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: massive improvement in gas usage of `BitmapUtils.bitmapToBytesA… (#149)
* feat: massive improvement in gas usage of `BitmapUtils.bitmapToBytesArray`
This function was naively using the built-in `bytes.concat` method, but it copies the array to memory, incurring memory expansion costs!
Fuzzed tests (e.g. testFuzz_BytesArrayToBitmapToBytesArray) -- which do the encoding twice -- show a ~20k gas improvement with this commit
see for reference:
https://github.com/Layr-Labs/eigenlayer-middleware/actions/runs/7574740337/job/20629810269#step:5:151-152
* chore: add some additional testing which logs the cost of the `bitmapToBytesArray` function
0 commit comments