Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gasoptvect, bool cleaning rules, storage positions, readSlots, forge update #58

Merged
merged 2 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 14 additions & 15 deletions gasbenchmark10mil
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
No files changed, compilation skipped

Running 1 test for test/GasBenchmark.t.sol:GasBenchmark
[PASS] testGas(address,bytes32) (runs: 256, μ: 14540532, ~: 14540813)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 289.94ms
[PASS] testGas(address,bytes32) (runs: 256, μ: 12620571, ~: 12621045)
Test result: ok. 1 passed; 0 failed; finished in 1.15s
| src/DelegateRegistry.sol:DelegateRegistry contract | | | | | |
|----------------------------------------------------|-----------------|--------|--------|--------|---------|
| Deployment Cost | Deployment Size | | | | |
| 2124658 | 10644 | | | | |
| 1804898 | 9047 | | | | |
| Function Name | min | avg | median | max | # calls |
| checkDelegateForAll | 2980 | 3183 | 3183 | 3386 | 2 |
| checkDelegateForContract | 5473 | 5895 | 5895 | 6317 | 2 |
| checkDelegateForERC1155 | 7990 | 8685 | 8685 | 9380 | 2 |
| checkDelegateForERC20 | 7927 | 8610 | 8610 | 9293 | 2 |
| checkDelegateForERC721 | 7991 | 8644 | 8644 | 9297 | 2 |
| delegateAll | 135861 | 135861 | 135861 | 135861 | 2 |
| delegateContract | 114469 | 125419 | 125419 | 136369 | 2 |
| delegateERC1155 | 159393 | 170343 | 170343 | 181293 | 2 |
| delegateERC20 | 136942 | 147892 | 147892 | 158842 | 2 |
| delegateERC721 | 136936 | 147886 | 147886 | 158836 | 2 |
| multicall | 689696 | 689696 | 689696 | 689696 | 1 |
| checkDelegateForAll | 2940 | 3151 | 3151 | 3363 | 2 |
| checkDelegateForContract | 5459 | 5897 | 5897 | 6336 | 2 |
| checkDelegateForERC1155 | 8003 | 8715 | 8715 | 9428 | 2 |
| checkDelegateForERC20 | 7942 | 8642 | 8642 | 9343 | 2 |
| checkDelegateForERC721 | 8006 | 8683 | 8683 | 9361 | 2 |
| delegateAll | 135846 | 135846 | 135846 | 135846 | 2 |
| delegateContract | 114436 | 125386 | 125386 | 136336 | 2 |
| delegateERC1155 | 159360 | 170310 | 170310 | 181260 | 2 |
| delegateERC20 | 136909 | 147859 | 147859 | 158809 | 2 |
| delegateERC721 | 136903 | 147853 | 147853 | 158803 | 2 |
| multicall | 689549 | 689549 | 689549 | 689549 | 1 |



Ran 1 test suites: 1 tests passed, 0 failed, 0 skipped (1 total tests)
27 changes: 13 additions & 14 deletions hashbenchmark10mil
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
No files changed, compilation skipped

Running 1 test for test/HashBenchmark.t.sol:HashBenchmark
[PASS] testHashGas(address,bytes32,address,uint256,address,bytes32) (runs: 256, μ: 20187, ~: 20187)
Test result: ok. 1 passed; 0 failed; 0 skipped; finished in 26.78ms
[PASS] testHashGas(address,bytes32,address,uint256,address,bytes32) (runs: 256, μ: 19906, ~: 19906)
Test result: ok. 1 passed; 0 failed; finished in 102.76ms
| test/HashBenchmark.t.sol:HashHarness contract | | | | | |
|-----------------------------------------------|-----------------|-----|--------|-----|---------|
| Deployment Cost | Deployment Size | | | | |
| 396030 | 2010 | | | | |
| 282524 | 1443 | | | | |
| Function Name | min | avg | median | max | # calls |
| allHash | 679 | 679 | 679 | 679 | 1 |
| allLocation | 724 | 724 | 724 | 724 | 1 |
| contractHash | 813 | 813 | 813 | 813 | 1 |
| contractLocation | 851 | 851 | 851 | 851 | 1 |
| allHash | 658 | 658 | 658 | 658 | 1 |
| allLocation | 715 | 715 | 715 | 715 | 1 |
| contractHash | 777 | 777 | 777 | 777 | 1 |
| contractLocation | 824 | 824 | 824 | 824 | 1 |
| decodeType | 371 | 371 | 371 | 371 | 1 |
| erc1155Hash | 821 | 821 | 821 | 821 | 1 |
| erc1155Location | 920 | 920 | 920 | 920 | 1 |
| erc20Hash | 792 | 792 | 792 | 792 | 1 |
| erc20Location | 831 | 831 | 831 | 831 | 1 |
| erc721Hash | 866 | 866 | 866 | 866 | 1 |
| erc721Location | 888 | 888 | 888 | 888 | 1 |
| erc1155Hash | 785 | 785 | 785 | 785 | 1 |
| erc1155Location | 899 | 899 | 899 | 899 | 1 |
| erc20Hash | 756 | 756 | 756 | 756 | 1 |
| erc20Location | 793 | 793 | 793 | 793 | 1 |
| erc721Hash | 830 | 830 | 830 | 830 | 1 |
| erc721Location | 867 | 867 | 867 | 867 | 1 |
| location | 384 | 384 | 384 | 384 | 1 |



Ran 1 test suites: 1 tests passed, 0 failed, 0 skipped (1 total tests)
2 changes: 1 addition & 1 deletion lib/forge-std
Loading
Loading