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

Optimize _packedOwnershipOf #435

Merged
merged 1 commit into from
Nov 15, 2022
Merged

Optimize _packedOwnershipOf #435

merged 1 commit into from
Nov 15, 2022

Conversation

Vectorized
Copy link
Collaborator

@Vectorized Vectorized commented Nov 15, 2022

Also fixes the extra space.

Before:

·----------------------------------------------|---------------------------|-------------|-----------------------------·
|             Solc version: 0.8.11             ·  Optimizer enabled: true  ·  Runs: 800  ·  Block limit: 30000000 gas  │
···············································|···························|·············|······························
|  Methods                                                                                                             │
···························|···················|·············|·············|·············|···············|··············
|  Contract                ·  Method           ·  Min        ·  Max        ·  Avg        ·  # calls      ·  usd (avg)  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  mintOne          ·      56165  ·      90365  ·      59585  ·           10  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  mintTen          ·      73540  ·     107740  ·      97480  ·           10  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  safeMintOne      ·      58915  ·      93115  ·      76015  ·            2  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  safeMintTen      ·      76291  ·     110491  ·      93391  ·            2  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  transferFrom     ·      42208  ·      86059  ·      53171  ·            4  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  transferTenAsc   ·          -  ·          -  ·     296259  ·            1  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  transferTenAvg   ·          -  ·          -  ·     297714  ·            1  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  transferTenDesc  ·          -  ·          -  ·     304291  ·            1  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AWithERC2309Mock  ·  mintOneERC2309   ·      56420  ·      90620  ·      73520  ·            3  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AWithERC2309Mock  ·  mintTenERC2309   ·      56397  ·      90597  ·      73497  ·            3  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  Deployments                                 ·                                         ·  % of limit   ·             │
···············································|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock                      ·          -  ·          -  ·    1113023  ·        3.7 %  ·          -  │
···············································|·············|·············|·············|···············|··············
|  ERC721AWithERC2309Mock                      ·          -  ·          -  ·     947715  ·        3.2 %  ·          -  │
·----------------------------------------------|-------------|-------------|-------------|---------------|-------------·

After:

·----------------------------------------------|---------------------------|-------------|-----------------------------·
|             Solc version: 0.8.11             ·  Optimizer enabled: true  ·  Runs: 800  ·  Block limit: 30000000 gas  │
···············································|···························|·············|······························
|  Methods                                                                                                             │
···························|···················|·············|·············|·············|···············|··············
|  Contract                ·  Method           ·  Min        ·  Max        ·  Avg        ·  # calls      ·  usd (avg)  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  mintOne          ·      56165  ·      90365  ·      59585  ·           10  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  mintTen          ·      73540  ·     107740  ·      97480  ·           10  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  safeMintOne      ·      58915  ·      93115  ·      76015  ·            2  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  safeMintTen      ·      76291  ·     110491  ·      93391  ·            2  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  transferFrom     ·      42178  ·      85989  ·      53131  ·            4  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  transferTenAsc   ·          -  ·          -  ·     295959  ·            1  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  transferTenAvg   ·          -  ·          -  ·     297254  ·            1  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock  ·  transferTenDesc  ·          -  ·          -  ·     303631  ·            1  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AWithERC2309Mock  ·  mintOneERC2309   ·      56420  ·      90620  ·      73520  ·            3  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  ERC721AWithERC2309Mock  ·  mintTenERC2309   ·      56397  ·      90597  ·      73497  ·            3  ·          -  │
···························|···················|·············|·············|·············|···············|··············
|  Deployments                                 ·                                         ·  % of limit   ·             │
···············································|·············|·············|·············|···············|··············
|  ERC721AGasReporterMock                      ·          -  ·          -  ·    1111763  ·        3.7 %  ·          -  │
···············································|·············|·············|·············|···············|··············
|  ERC721AWithERC2309Mock                      ·          -  ·          -  ·     946425  ·        3.2 %  ·          -  │
·----------------------------------------------|-------------|-------------|-------------|---------------|-------------·

@Vectorized Vectorized merged commit 0476a00 into chiru-labs:main Nov 15, 2022
@Vectorized Vectorized deleted the opt2 branch November 15, 2022 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant