Vectorized / solady

Optimized Solidity snippets.
MIT License
2.6k stars 346 forks source link

✨ Add convenience equality check #1160

Closed Vectorized closed 2 weeks ago

Vectorized commented 2 weeks ago

Description

abi.decode(a, (bytes32)) costs 90 more gas.

Checklist

Ensure you completed all of the steps below before submitting your pull request:

Pull requests with an incomplete checklist will be thrown out.

github-actions[bot] commented 2 weeks ago

Gas Snapshot Comparison Report

Generated at commit : 6b46357cfc1dfa559d3594530d255f37ac6c97a0, Compared to commit : 1c9927e9eb0c280c44c81c943976fe8995b382ed

Contract Name Test Name Main Gas PR Gas Diff
EfficientHashLibTest testEfficientHashBytesSlice() 26824 26847 23
testEfficientHashFree() 350 416 66
test__codesize() 6370 6895 525
testEfficientHashEq() - 288 -