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

[Performance] Add '-O2' #4265

Closed
wants to merge 1 commit into from
Closed

Conversation

effectfully
Copy link
Contributor

Just to check how adding -O2 to plutus-core affects performance.

@effectfully effectfully added Performance EXPERIMENT Experiments that we probably don't want to merge labels Dec 6, 2021
@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and '6295c9c6f' (PR)

Script b778f9a 6295c9c Change
auction_1-1 401.2 μs 403.8 μs +0.6%
auction_1-2 1.180 ms 1.200 ms +1.7%
auction_1-3 1.181 ms 1.203 ms +1.9%
auction_1-4 533.6 μs 536.2 μs +0.5%
auction_2-1 403.9 μs 405.8 μs +0.5%
auction_2-2 1.178 ms 1.203 ms +2.1%
auction_2-3 1.485 ms 1.515 ms +2.0%
auction_2-4 1.185 ms 1.205 ms +1.7%
auction_2-5 533.9 μs 538.9 μs +0.9%
crowdfunding-success-1 478.9 μs 482.0 μs +0.6%
crowdfunding-success-2 479.7 μs 483.1 μs +0.7%
crowdfunding-success-3 479.4 μs 484.0 μs +1.0%
currency-1 484.0 μs 492.3 μs +1.7%
escrow-redeem_1-1 741.1 μs 747.7 μs +0.9%
escrow-redeem_1-2 740.0 μs 746.6 μs +0.9%
escrow-redeem_2-1 850.3 μs 853.7 μs +0.4%
escrow-redeem_2-2 852.0 μs 856.3 μs +0.5%
escrow-redeem_2-3 849.6 μs 857.3 μs +0.9%
escrow-refund-1 354.3 μs 358.8 μs +1.3%
future-increase-margin-1 485.4 μs 493.8 μs +1.7%
future-increase-margin-2 1.072 ms 1.083 ms +1.0%
future-increase-margin-3 1.071 ms 1.084 ms +1.2%
future-increase-margin-4 973.4 μs 990.6 μs +1.8%
future-increase-margin-5 1.422 ms 1.447 ms +1.8%
future-pay-out-1 483.8 μs 493.6 μs +2.0%
future-pay-out-2 1.070 ms 1.083 ms +1.2%
future-pay-out-3 1.067 ms 1.082 ms +1.4%
future-pay-out-4 1.416 ms 1.434 ms +1.3%
future-settle-early-1 484.1 μs 491.4 μs +1.5%
future-settle-early-2 1.074 ms 1.081 ms +0.7%
future-settle-early-3 1.071 ms 1.081 ms +0.9%
future-settle-early-4 1.122 ms 1.134 ms +1.1%
game-sm-success_1-1 816.0 μs 824.1 μs +1.0%
game-sm-success_1-2 455.2 μs 457.6 μs +0.5%
game-sm-success_1-3 1.198 ms 1.211 ms +1.1%
game-sm-success_1-4 530.9 μs 531.4 μs +0.1%
game-sm-success_2-1 819.6 μs 821.2 μs +0.2%
game-sm-success_2-2 455.0 μs 455.3 μs +0.1%
game-sm-success_2-3 1.204 ms 1.211 ms +0.6%
game-sm-success_2-4 529.7 μs 531.2 μs +0.3%
game-sm-success_2-5 1.203 ms 1.213 ms +0.8%
game-sm-success_2-6 528.2 μs 532.6 μs +0.8%
multisig-sm-1 820.8 μs 827.4 μs +0.8%
multisig-sm-2 807.9 μs 815.6 μs +1.0%
multisig-sm-3 817.1 μs 823.2 μs +0.7%
multisig-sm-4 824.7 μs 831.0 μs +0.8%
multisig-sm-5 1.064 ms 1.079 ms +1.4%
multisig-sm-6 817.7 μs 826.9 μs +1.1%
multisig-sm-7 807.5 μs 814.2 μs +0.8%
multisig-sm-8 812.8 μs 821.8 μs +1.1%
multisig-sm-9 820.3 μs 828.7 μs +1.0%
multisig-sm-10 1.060 ms 1.070 ms +0.9%
ping-pong-1 678.3 μs 682.2 μs +0.6%
ping-pong-2 680.0 μs 684.6 μs +0.7%
ping-pong_2-1 436.3 μs 437.9 μs +0.4%
prism-1 378.8 μs 379.1 μs +0.1%
prism-2 878.2 μs 888.2 μs +1.1%
prism-3 758.1 μs 762.8 μs +0.6%
pubkey-1 322.0 μs 322.9 μs +0.3%
stablecoin_1-1 1.683 ms 1.698 ms +0.9%
stablecoin_1-2 446.1 μs 445.9 μs -0.0%
stablecoin_1-3 1.933 ms 1.955 ms +1.1%
stablecoin_1-4 472.4 μs 473.7 μs +0.3%
stablecoin_1-5 2.472 ms 2.490 ms +0.7%
stablecoin_1-6 587.0 μs 586.2 μs -0.1%
stablecoin_2-1 1.682 ms 1.695 ms +0.8%
stablecoin_2-2 444.0 μs 442.2 μs -0.4%
stablecoin_2-3 1.934 ms 1.942 ms +0.4%
stablecoin_2-4 471.1 μs 471.8 μs +0.1%
token-account-1 383.7 μs 387.8 μs +1.1%
token-account-2 676.4 μs 683.0 μs +1.0%
uniswap-1 758.8 μs 769.1 μs +1.4%
uniswap-2 468.6 μs 472.7 μs +0.9%
uniswap-3 3.124 ms 3.181 ms +1.8%
uniswap-4 765.0 μs 771.5 μs +0.8%
uniswap-5 2.241 ms 2.280 ms +1.7%
uniswap-6 732.3 μs 733.8 μs +0.2%
vesting-1 693.1 μs 698.3 μs +0.8%

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and '6295c9c6f' (PR)

Script b778f9a 6295c9c Change
auction_1-1 401.0 μs 404.5 μs +0.9%
auction_1-2 1.182 ms 1.197 ms +1.3%
auction_1-3 1.187 ms 1.201 ms +1.2%
auction_1-4 535.7 μs 538.3 μs +0.5%
auction_2-1 404.6 μs 406.3 μs +0.4%
auction_2-2 1.180 ms 1.198 ms +1.5%
auction_2-3 1.486 ms 1.509 ms +1.5%
auction_2-4 1.181 ms 1.203 ms +1.9%
auction_2-5 533.2 μs 539.3 μs +1.1%
crowdfunding-success-1 479.0 μs 483.3 μs +0.9%
crowdfunding-success-2 479.9 μs 483.5 μs +0.8%
crowdfunding-success-3 480.5 μs 484.4 μs +0.8%
currency-1 482.4 μs 495.1 μs +2.6%
escrow-redeem_1-1 740.2 μs 750.7 μs +1.4%
escrow-redeem_1-2 741.9 μs 750.3 μs +1.1%
escrow-redeem_2-1 846.2 μs 856.7 μs +1.2%
escrow-redeem_2-2 849.9 μs 856.1 μs +0.7%
escrow-redeem_2-3 852.4 μs 858.1 μs +0.7%
escrow-refund-1 353.2 μs 359.3 μs +1.7%
future-increase-margin-1 484.1 μs 493.8 μs +2.0%
future-increase-margin-2 1.069 ms 1.082 ms +1.2%
future-increase-margin-3 1.067 ms 1.085 ms +1.7%
future-increase-margin-4 970.8 μs 984.3 μs +1.4%
future-increase-margin-5 1.425 ms 1.441 ms +1.1%
future-pay-out-1 484.8 μs 493.6 μs +1.8%
future-pay-out-2 1.072 ms 1.086 ms +1.3%
future-pay-out-3 1.071 ms 1.088 ms +1.6%
future-pay-out-4 1.426 ms 1.442 ms +1.1%
future-settle-early-1 484.0 μs 495.6 μs +2.4%
future-settle-early-2 1.070 ms 1.089 ms +1.8%
future-settle-early-3 1.068 ms 1.087 ms +1.8%
future-settle-early-4 1.122 ms 1.133 ms +1.0%
game-sm-success_1-1 815.7 μs 824.9 μs +1.1%
game-sm-success_1-2 453.9 μs 457.4 μs +0.8%
game-sm-success_1-3 1.198 ms 1.214 ms +1.3%
game-sm-success_1-4 528.4 μs 533.5 μs +1.0%
game-sm-success_2-1 817.2 μs 822.9 μs +0.7%
game-sm-success_2-2 453.4 μs 457.3 μs +0.9%
game-sm-success_2-3 1.198 ms 1.218 ms +1.7%
game-sm-success_2-4 528.8 μs 534.9 μs +1.2%
game-sm-success_2-5 1.200 ms 1.221 ms +1.8%
game-sm-success_2-6 527.8 μs 534.6 μs +1.3%
multisig-sm-1 817.5 μs 829.9 μs +1.5%
multisig-sm-2 808.9 μs 816.7 μs +1.0%
multisig-sm-3 815.4 μs 826.8 μs +1.4%
multisig-sm-4 821.2 μs 830.0 μs +1.1%
multisig-sm-5 1.060 ms 1.077 ms +1.6%
multisig-sm-6 819.0 μs 831.5 μs +1.5%
multisig-sm-7 812.5 μs 820.6 μs +1.0%
multisig-sm-8 819.4 μs 828.4 μs +1.1%
multisig-sm-9 824.1 μs 836.6 μs +1.5%
multisig-sm-10 1.068 ms 1.083 ms +1.4%
ping-pong-1 678.7 μs 687.1 μs +1.2%
ping-pong-2 680.3 μs 687.0 μs +1.0%
ping-pong_2-1 437.0 μs 440.8 μs +0.9%
prism-1 380.2 μs 380.3 μs +0.0%
prism-2 879.1 μs 888.8 μs +1.1%
prism-3 757.6 μs 763.0 μs +0.7%
pubkey-1 324.3 μs 324.0 μs -0.1%
stablecoin_1-1 1.685 ms 1.709 ms +1.4%
stablecoin_1-2 443.5 μs 445.3 μs +0.4%
stablecoin_1-3 1.932 ms 1.953 ms +1.1%
stablecoin_1-4 472.9 μs 474.6 μs +0.4%
stablecoin_1-5 2.477 ms 2.495 ms +0.7%
stablecoin_1-6 587.3 μs 587.5 μs +0.0%
stablecoin_2-1 1.685 ms 1.715 ms +1.8%
stablecoin_2-2 443.9 μs 447.4 μs +0.8%
stablecoin_2-3 1.927 ms 1.958 ms +1.6%
stablecoin_2-4 473.7 μs 476.7 μs +0.6%
token-account-1 384.9 μs 390.4 μs +1.4%
token-account-2 680.0 μs 684.1 μs +0.6%
uniswap-1 760.3 μs 771.0 μs +1.4%
uniswap-2 468.8 μs 473.5 μs +1.0%
uniswap-3 3.139 ms 3.186 ms +1.5%
uniswap-4 767.4 μs 769.6 μs +0.3%
uniswap-5 2.240 ms 2.280 ms +1.8%
uniswap-6 729.7 μs 732.2 μs +0.3%
vesting-1 689.0 μs 697.6 μs +1.2%

@effectfully
Copy link
Contributor Author

Don't close this one for now, I'll try adding -O2 to individual modules as I've seen that affect performance in a positive way.

@effectfully
Copy link
Contributor Author

Don't close this one for now, I'll try adding -O2 to individual modules as I've seen that affect performance in a positive way.

No point doing that now when the builtins machinery is still not finalized. Closing, but I'll probably reopen it later.

@effectfully effectfully deleted the effectfully/performance/add-O2 branch March 10, 2022 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EXPERIMENT Experiments that we probably don't want to merge Performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants