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

[Builtins] Optimize 'Typed' via 'INLINE' pragmas #4264

Merged
merged 12 commits into from
Dec 26, 2021

Conversation

effectfully
Copy link
Contributor

I looked at Core and found some opportunities for optimization. The Core now looks better, but let's see what benchmarks say. If things are not slower, I'll add some docs and merge that.

@effectfully
Copy link
Contributor Author

/benchmark

@effectfully effectfully force-pushed the effectfully/optimize-KnownTypeIn branch from df42f6b to 9804959 Compare December 4, 2021 20:43
@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and 'df42f6ba9' (PR)

Script b778f9a df42f6b Change
auction_1-1 404.8 μs 389.2 μs -3.9%
auction_1-2 1.189 ms 1.162 ms -2.3%
auction_1-3 1.197 ms 1.165 ms -2.7%
auction_1-4 538.6 μs 518.7 μs -3.7%
auction_2-1 407.3 μs 391.9 μs -3.8%
auction_2-2 1.190 ms 1.163 ms -2.3%
auction_2-3 1.500 ms 1.461 ms -2.6%
auction_2-4 1.193 ms 1.168 ms -2.1%
auction_2-5 538.5 μs 518.5 μs -3.7%
crowdfunding-success-1 483.6 μs 463.2 μs -4.2%
crowdfunding-success-2 484.6 μs 465.4 μs -4.0%
crowdfunding-success-3 485.3 μs 464.9 μs -4.2%
currency-1 487.7 μs 477.3 μs -2.1%
escrow-redeem_1-1 749.1 μs 723.4 μs -3.4%
escrow-redeem_1-2 748.5 μs 721.4 μs -3.6%
escrow-redeem_2-1 856.1 μs 830.5 μs -3.0%
escrow-redeem_2-2 854.3 μs 828.3 μs -3.0%
escrow-redeem_2-3 857.2 μs 828.4 μs -3.4%
escrow-refund-1 356.8 μs 343.0 μs -3.9%
future-increase-margin-1 487.2 μs 474.6 μs -2.6%
future-increase-margin-2 1.077 ms 1.048 ms -2.7%
future-increase-margin-3 1.076 ms 1.047 ms -2.7%
future-increase-margin-4 981.9 μs 959.3 μs -2.3%
future-increase-margin-5 1.429 ms 1.401 ms -2.0%
future-pay-out-1 486.7 μs 474.3 μs -2.5%
future-pay-out-2 1.074 ms 1.046 ms -2.6%
future-pay-out-3 1.075 ms 1.047 ms -2.6%
future-pay-out-4 1.426 ms 1.398 ms -2.0%
future-settle-early-1 487.2 μs 474.8 μs -2.5%
future-settle-early-2 1.080 ms 1.046 ms -3.1%
future-settle-early-3 1.078 ms 1.047 ms -2.9%
future-settle-early-4 1.129 ms 1.103 ms -2.3%
game-sm-success_1-1 824.2 μs 796.5 μs -3.4%
game-sm-success_1-2 457.7 μs 438.2 μs -4.3%
game-sm-success_1-3 1.206 ms 1.179 ms -2.2%
game-sm-success_1-4 530.8 μs 514.3 μs -3.1%
game-sm-success_2-1 821.6 μs 798.5 μs -2.8%
game-sm-success_2-2 455.5 μs 437.3 μs -4.0%
game-sm-success_2-3 1.201 ms 1.178 ms -1.9%
game-sm-success_2-4 529.9 μs 514.3 μs -2.9%
game-sm-success_2-5 1.202 ms 1.181 ms -1.7%
game-sm-success_2-6 532.1 μs 514.0 μs -3.4%
multisig-sm-1 822.2 μs 804.4 μs -2.2%
multisig-sm-2 809.9 μs 789.6 μs -2.5%
multisig-sm-3 817.1 μs 798.2 μs -2.3%
multisig-sm-4 823.1 μs 805.2 μs -2.2%
multisig-sm-5 1.062 ms 1.042 ms -1.9%
multisig-sm-6 820.2 μs 802.2 μs -2.2%
multisig-sm-7 810.3 μs 785.6 μs -3.0%
multisig-sm-8 819.3 μs 797.5 μs -2.7%
multisig-sm-9 827.7 μs 805.4 μs -2.7%
multisig-sm-10 1.072 ms 1.048 ms -2.2%
ping-pong-1 683.4 μs 660.0 μs -3.4%
ping-pong-2 683.2 μs 659.1 μs -3.5%
ping-pong_2-1 437.3 μs 421.6 μs -3.6%
prism-1 380.2 μs 366.2 μs -3.7%
prism-2 880.3 μs 863.0 μs -2.0%
prism-3 760.1 μs 745.6 μs -1.9%
pubkey-1 326.2 μs 312.9 μs -4.1%
stablecoin_1-1 1.691 ms 1.644 ms -2.8%
stablecoin_1-2 445.4 μs 431.7 μs -3.1%
stablecoin_1-3 1.933 ms 1.879 ms -2.8%
stablecoin_1-4 473.9 μs 458.0 μs -3.4%
stablecoin_1-5 2.471 ms 2.391 ms -3.2%
stablecoin_1-6 588.6 μs 565.2 μs -4.0%
stablecoin_2-1 1.686 ms 1.645 ms -2.4%
stablecoin_2-2 445.1 μs 429.9 μs -3.4%
stablecoin_2-3 1.939 ms 1.875 ms -3.3%
stablecoin_2-4 475.3 μs 456.1 μs -4.0%
token-account-1 385.2 μs 373.6 μs -3.0%
token-account-2 682.8 μs 658.0 μs -3.6%
uniswap-1 763.1 μs 743.4 μs -2.6%
uniswap-2 470.0 μs 456.9 μs -2.8%
uniswap-3 3.130 ms 3.036 ms -3.0%
uniswap-4 768.2 μs 745.3 μs -3.0%
uniswap-5 2.246 ms 2.178 ms -3.0%
uniswap-6 733.4 μs 708.9 μs -3.3%
vesting-1 693.8 μs 675.5 μs -2.6%

@effectfully effectfully force-pushed the effectfully/optimize-KnownTypeIn branch from 9804959 to 838f4dc Compare December 5, 2021 01:08
@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and '838f4dcde' (PR)

Script b778f9a 838f4dc Change
auction_1-1 401.9 μs 389.5 μs -3.1%
auction_1-2 1.183 ms 1.167 ms -1.4%
auction_1-3 1.185 ms 1.168 ms -1.4%
auction_1-4 535.4 μs 517.2 μs -3.4%
auction_2-1 404.3 μs 392.2 μs -3.0%
auction_2-2 1.181 ms 1.164 ms -1.4%
auction_2-3 1.488 ms 1.461 ms -1.8%
auction_2-4 1.186 ms 1.166 ms -1.7%
auction_2-5 535.5 μs 519.9 μs -2.9%
crowdfunding-success-1 481.7 μs 464.4 μs -3.6%
crowdfunding-success-2 480.4 μs 464.3 μs -3.4%
crowdfunding-success-3 481.6 μs 464.4 μs -3.6%
currency-1 484.3 μs 475.2 μs -1.9%
escrow-redeem_1-1 742.4 μs 722.5 μs -2.7%
escrow-redeem_1-2 742.2 μs 721.3 μs -2.8%
escrow-redeem_2-1 853.3 μs 832.7 μs -2.4%
escrow-redeem_2-2 851.4 μs 826.0 μs -3.0%
escrow-redeem_2-3 851.0 μs 826.4 μs -2.9%
escrow-refund-1 354.9 μs 342.6 μs -3.5%
future-increase-margin-1 485.0 μs 474.4 μs -2.2%
future-increase-margin-2 1.072 ms 1.047 ms -2.3%
future-increase-margin-3 1.070 ms 1.047 ms -2.1%
future-increase-margin-4 975.4 μs 956.7 μs -1.9%
future-increase-margin-5 1.425 ms 1.403 ms -1.5%
future-pay-out-1 483.3 μs 473.6 μs -2.0%
future-pay-out-2 1.070 ms 1.045 ms -2.3%
future-pay-out-3 1.073 ms 1.046 ms -2.5%
future-pay-out-4 1.426 ms 1.400 ms -1.8%
future-settle-early-1 484.0 μs 474.0 μs -2.1%
future-settle-early-2 1.070 ms 1.046 ms -2.2%
future-settle-early-3 1.072 ms 1.046 ms -2.4%
future-settle-early-4 1.121 ms 1.108 ms -1.2%
game-sm-success_1-1 818.8 μs 795.9 μs -2.8%
game-sm-success_1-2 454.5 μs 437.7 μs -3.7%
game-sm-success_1-3 1.206 ms 1.174 ms -2.7%
game-sm-success_1-4 530.9 μs 513.1 μs -3.4%
game-sm-success_2-1 821.0 μs 796.0 μs -3.0%
game-sm-success_2-2 455.0 μs 436.4 μs -4.1%
game-sm-success_2-3 1.205 ms 1.177 ms -2.3%
game-sm-success_2-4 529.1 μs 514.3 μs -2.8%
game-sm-success_2-5 1.202 ms 1.183 ms -1.6%
game-sm-success_2-6 529.8 μs 514.7 μs -2.9%
multisig-sm-1 820.2 μs 802.2 μs -2.2%
multisig-sm-2 809.3 μs 790.4 μs -2.3%
multisig-sm-3 817.2 μs 799.7 μs -2.1%
multisig-sm-4 822.5 μs 804.9 μs -2.1%
multisig-sm-5 1.064 ms 1.043 ms -2.0%
multisig-sm-6 819.3 μs 801.2 μs -2.2%
multisig-sm-7 808.5 μs 786.0 μs -2.8%
multisig-sm-8 814.2 μs 795.8 μs -2.3%
multisig-sm-9 823.4 μs 806.8 μs -2.0%
multisig-sm-10 1.063 ms 1.047 ms -1.5%
ping-pong-1 677.7 μs 660.2 μs -2.6%
ping-pong-2 676.5 μs 657.8 μs -2.8%
ping-pong_2-1 434.7 μs 421.6 μs -3.0%
prism-1 377.7 μs 366.4 μs -3.0%
prism-2 879.7 μs 862.0 μs -2.0%
prism-3 760.3 μs 745.8 μs -1.9%
pubkey-1 322.5 μs 311.7 μs -3.3%
stablecoin_1-1 1.691 ms 1.642 ms -2.9%
stablecoin_1-2 445.1 μs 430.5 μs -3.3%
stablecoin_1-3 1.937 ms 1.877 ms -3.1%
stablecoin_1-4 472.3 μs 456.5 μs -3.3%
stablecoin_1-5 2.467 ms 2.383 ms -3.4%
stablecoin_1-6 585.5 μs 565.4 μs -3.4%
stablecoin_2-1 1.688 ms 1.642 ms -2.7%
stablecoin_2-2 442.7 μs 429.3 μs -3.0%
stablecoin_2-3 1.934 ms 1.871 ms -3.3%
stablecoin_2-4 472.4 μs 455.7 μs -3.5%
token-account-1 383.8 μs 373.1 μs -2.8%
token-account-2 676.6 μs 658.0 μs -2.7%
uniswap-1 757.9 μs 744.2 μs -1.8%
uniswap-2 467.7 μs 455.9 μs -2.5%
uniswap-3 3.124 ms 3.032 ms -2.9%
uniswap-4 768.2 μs 743.9 μs -3.2%
uniswap-5 2.249 ms 2.173 ms -3.4%
uniswap-6 731.9 μs 707.8 μs -3.3%
vesting-1 691.7 μs 674.6 μs -2.5%

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and '838f4dcde' (PR)

Script b778f9a 838f4dc Change
auction_1-1 402.8 μs 391.1 μs -2.9%
auction_1-2 1.187 ms 1.168 ms -1.6%
auction_1-3 1.189 ms 1.173 ms -1.3%
auction_1-4 536.1 μs 520.2 μs -3.0%
auction_2-1 405.0 μs 392.8 μs -3.0%
auction_2-2 1.184 ms 1.169 ms -1.3%
auction_2-3 1.492 ms 1.465 ms -1.8%
auction_2-4 1.191 ms 1.171 ms -1.7%
auction_2-5 538.6 μs 521.2 μs -3.2%
crowdfunding-success-1 482.5 μs 466.7 μs -3.3%
crowdfunding-success-2 482.8 μs 466.3 μs -3.4%
crowdfunding-success-3 483.2 μs 465.1 μs -3.7%
currency-1 486.2 μs 476.8 μs -1.9%
escrow-redeem_1-1 745.1 μs 722.8 μs -3.0%
escrow-redeem_1-2 744.2 μs 723.5 μs -2.8%
escrow-redeem_2-1 850.1 μs 830.3 μs -2.3%
escrow-redeem_2-2 850.2 μs 828.5 μs -2.6%
escrow-redeem_2-3 849.7 μs 829.1 μs -2.4%
escrow-refund-1 354.7 μs 343.4 μs -3.2%
future-increase-margin-1 485.3 μs 475.6 μs -2.0%
future-increase-margin-2 1.071 ms 1.049 ms -2.1%
future-increase-margin-3 1.072 ms 1.049 ms -2.1%
future-increase-margin-4 976.5 μs 962.3 μs -1.5%
future-increase-margin-5 1.424 ms 1.411 ms -0.9%
future-pay-out-1 485.5 μs 477.5 μs -1.6%
future-pay-out-2 1.079 ms 1.052 ms -2.5%
future-pay-out-3 1.079 ms 1.051 ms -2.6%
future-pay-out-4 1.430 ms 1.407 ms -1.6%
future-settle-early-1 487.3 μs 476.4 μs -2.2%
future-settle-early-2 1.074 ms 1.051 ms -2.1%
future-settle-early-3 1.077 ms 1.050 ms -2.5%
future-settle-early-4 1.127 ms 1.109 ms -1.6%
game-sm-success_1-1 820.8 μs 800.5 μs -2.5%
game-sm-success_1-2 456.7 μs 439.3 μs -3.8%
game-sm-success_1-3 1.204 ms 1.180 ms -2.0%
game-sm-success_1-4 530.3 μs 517.0 μs -2.5%
game-sm-success_2-1 819.0 μs 802.2 μs -2.1%
game-sm-success_2-2 454.7 μs 439.9 μs -3.3%
game-sm-success_2-3 1.209 ms 1.182 ms -2.2%
game-sm-success_2-4 531.0 μs 515.3 μs -3.0%
game-sm-success_2-5 1.203 ms 1.181 ms -1.8%
game-sm-success_2-6 530.7 μs 515.8 μs -2.8%
multisig-sm-1 820.2 μs 802.6 μs -2.1%
multisig-sm-2 810.8 μs 789.7 μs -2.6%
multisig-sm-3 820.1 μs 796.2 μs -2.9%
multisig-sm-4 828.7 μs 807.1 μs -2.6%
multisig-sm-5 1.071 ms 1.048 ms -2.1%
multisig-sm-6 824.7 μs 802.9 μs -2.6%
multisig-sm-7 814.1 μs 789.1 μs -3.1%
multisig-sm-8 821.0 μs 800.5 μs -2.5%
multisig-sm-9 825.7 μs 810.2 μs -1.9%
multisig-sm-10 1.068 ms 1.050 ms -1.7%
ping-pong-1 682.4 μs 664.1 μs -2.7%
ping-pong-2 680.5 μs 661.0 μs -2.9%
ping-pong_2-1 435.7 μs 423.2 μs -2.9%
prism-1 380.7 μs 367.3 μs -3.5%
prism-2 879.8 μs 862.3 μs -2.0%
prism-3 757.9 μs 744.9 μs -1.7%
pubkey-1 324.1 μs 312.6 μs -3.5%
stablecoin_1-1 1.689 ms 1.638 ms -3.0%
stablecoin_1-2 445.7 μs 431.1 μs -3.3%
stablecoin_1-3 1.931 ms 1.869 ms -3.2%
stablecoin_1-4 472.6 μs 457.9 μs -3.1%
stablecoin_1-5 2.472 ms 2.381 ms -3.7%
stablecoin_1-6 588.7 μs 569.1 μs -3.3%
stablecoin_2-1 1.698 ms 1.643 ms -3.2%
stablecoin_2-2 448.5 μs 431.2 μs -3.9%
stablecoin_2-3 1.940 ms 1.875 ms -3.4%
stablecoin_2-4 474.3 μs 458.6 μs -3.3%
token-account-1 384.7 μs 374.5 μs -2.7%
token-account-2 678.1 μs 660.0 μs -2.7%
uniswap-1 758.4 μs 748.9 μs -1.3%
uniswap-2 467.6 μs 458.6 μs -1.9%
uniswap-3 3.123 ms 3.053 ms -2.2%
uniswap-4 769.4 μs 748.6 μs -2.7%
uniswap-5 2.249 ms 2.183 ms -2.9%
uniswap-6 732.9 μs 711.3 μs -2.9%
vesting-1 692.6 μs 676.8 μs -2.3%

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and 'a3d042783' (PR)

Script b778f9a a3d0427 Change
auction_1-1 402.8 μs 385.3 μs -4.3%
auction_1-2 1.185 ms 1.160 ms -2.1%
auction_1-3 1.191 ms 1.165 ms -2.2%
auction_1-4 534.8 μs 510.7 μs -4.5%
auction_2-1 404.5 μs 385.5 μs -4.7%
auction_2-2 1.183 ms 1.157 ms -2.2%
auction_2-3 1.488 ms 1.466 ms -1.5%
auction_2-4 1.184 ms 1.167 ms -1.4%
auction_2-5 534.5 μs 512.8 μs -4.1%
crowdfunding-success-1 479.3 μs 457.8 μs -4.5%
crowdfunding-success-2 480.3 μs 458.5 μs -4.5%
crowdfunding-success-3 480.9 μs 458.4 μs -4.7%
currency-1 484.0 μs 473.8 μs -2.1%
escrow-redeem_1-1 741.0 μs 716.5 μs -3.3%
escrow-redeem_1-2 741.8 μs 715.7 μs -3.5%
escrow-redeem_2-1 850.1 μs 822.6 μs -3.2%
escrow-redeem_2-2 849.6 μs 824.3 μs -3.0%
escrow-redeem_2-3 847.4 μs 821.7 μs -3.0%
escrow-refund-1 353.4 μs 338.8 μs -4.1%
future-increase-margin-1 483.7 μs 471.6 μs -2.5%
future-increase-margin-2 1.071 ms 1.042 ms -2.7%
future-increase-margin-3 1.074 ms 1.043 ms -2.9%
future-increase-margin-4 977.1 μs 953.8 μs -2.4%
future-increase-margin-5 1.429 ms 1.397 ms -2.2%
future-pay-out-1 485.3 μs 472.7 μs -2.6%
future-pay-out-2 1.073 ms 1.043 ms -2.8%
future-pay-out-3 1.072 ms 1.041 ms -2.9%
future-pay-out-4 1.423 ms 1.396 ms -1.9%
future-settle-early-1 484.3 μs 475.5 μs -1.8%
future-settle-early-2 1.069 ms 1.043 ms -2.4%
future-settle-early-3 1.066 ms 1.042 ms -2.3%
future-settle-early-4 1.117 ms 1.099 ms -1.6%
game-sm-success_1-1 817.6 μs 793.6 μs -2.9%
game-sm-success_1-2 453.6 μs 432.3 μs -4.7%
game-sm-success_1-3 1.202 ms 1.173 ms -2.4%
game-sm-success_1-4 529.5 μs 506.5 μs -4.3%
game-sm-success_2-1 819.1 μs 793.7 μs -3.1%
game-sm-success_2-2 453.1 μs 432.0 μs -4.7%
game-sm-success_2-3 1.199 ms 1.170 ms -2.4%
game-sm-success_2-4 527.6 μs 505.0 μs -4.3%
game-sm-success_2-5 1.198 ms 1.174 ms -2.0%
game-sm-success_2-6 528.9 μs 507.8 μs -4.0%
multisig-sm-1 818.1 μs 796.5 μs -2.6%
multisig-sm-2 810.9 μs 782.7 μs -3.5%
multisig-sm-3 826.0 μs 792.7 μs -4.0%
multisig-sm-4 829.1 μs 800.9 μs -3.4%
multisig-sm-5 1.071 ms 1.045 ms -2.4%
multisig-sm-6 824.6 μs 800.8 μs -2.9%
multisig-sm-7 811.6 μs 788.9 μs -2.8%
multisig-sm-8 819.7 μs 797.9 μs -2.7%
multisig-sm-9 825.4 μs 803.9 μs -2.6%
multisig-sm-10 1.067 ms 1.042 ms -2.3%
ping-pong-1 678.8 μs 654.3 μs -3.6%
ping-pong-2 679.0 μs 655.5 μs -3.5%
ping-pong_2-1 436.0 μs 417.0 μs -4.4%
prism-1 379.2 μs 360.4 μs -5.0%
prism-2 877.2 μs 854.9 μs -2.5%
prism-3 756.0 μs 739.4 μs -2.2%
pubkey-1 322.5 μs 308.9 μs -4.2%
stablecoin_1-1 1.682 ms 1.633 ms -2.9%
stablecoin_1-2 443.9 μs 424.8 μs -4.3%
stablecoin_1-3 1.921 ms 1.861 ms -3.1%
stablecoin_1-4 471.8 μs 451.9 μs -4.2%
stablecoin_1-5 2.469 ms 2.362 ms -4.3%
stablecoin_1-6 586.0 μs 559.8 μs -4.5%
stablecoin_2-1 1.687 ms 1.638 ms -2.9%
stablecoin_2-2 445.8 μs 425.8 μs -4.5%
stablecoin_2-3 1.934 ms 1.867 ms -3.5%
stablecoin_2-4 472.5 μs 453.3 μs -4.1%
token-account-1 382.5 μs 371.6 μs -2.8%
token-account-2 676.4 μs 657.8 μs -2.7%
uniswap-1 755.7 μs 747.3 μs -1.1%
uniswap-2 467.1 μs 455.1 μs -2.6%
uniswap-3 3.120 ms 3.034 ms -2.8%
uniswap-4 764.6 μs 736.1 μs -3.7%
uniswap-5 2.242 ms 2.166 ms -3.4%
uniswap-6 730.7 μs 702.3 μs -3.9%
vesting-1 689.3 μs 672.8 μs -2.4%

@effectfully effectfully force-pushed the effectfully/optimize-KnownTypeIn branch 2 times, most recently from eabadb9 to 250e69b Compare December 5, 2021 05:16
@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and '250e69b84' (PR)

Script b778f9a 250e69b Change
auction_1-1 401.9 μs 389.7 μs -3.0%
auction_1-2 1.187 ms 1.161 ms -2.2%
auction_1-3 1.190 ms 1.164 ms -2.2%
auction_1-4 534.1 μs 516.0 μs -3.4%
auction_2-1 404.3 μs 390.9 μs -3.3%
auction_2-2 1.183 ms 1.158 ms -2.1%
auction_2-3 1.490 ms 1.459 ms -2.1%
auction_2-4 1.187 ms 1.167 ms -1.7%
auction_2-5 533.2 μs 518.2 μs -2.8%
crowdfunding-success-1 479.1 μs 462.8 μs -3.4%
crowdfunding-success-2 479.0 μs 463.4 μs -3.3%
crowdfunding-success-3 479.8 μs 462.6 μs -3.6%
currency-1 484.0 μs 471.4 μs -2.6%
escrow-redeem_1-1 740.5 μs 717.6 μs -3.1%
escrow-redeem_1-2 740.8 μs 715.8 μs -3.4%
escrow-redeem_2-1 848.5 μs 825.0 μs -2.8%
escrow-redeem_2-2 847.6 μs 822.6 μs -2.9%
escrow-redeem_2-3 847.5 μs 822.6 μs -2.9%
escrow-refund-1 352.9 μs 340.1 μs -3.6%
future-increase-margin-1 483.2 μs 472.3 μs -2.3%
future-increase-margin-2 1.070 ms 1.046 ms -2.2%
future-increase-margin-3 1.073 ms 1.044 ms -2.7%
future-increase-margin-4 979.8 μs 952.0 μs -2.8%
future-increase-margin-5 1.436 ms 1.397 ms -2.7%
future-pay-out-1 484.9 μs 469.5 μs -3.2%
future-pay-out-2 1.073 ms 1.043 ms -2.8%
future-pay-out-3 1.073 ms 1.047 ms -2.4%
future-pay-out-4 1.430 ms 1.403 ms -1.9%
future-settle-early-1 485.3 μs 472.6 μs -2.6%
future-settle-early-2 1.070 ms 1.046 ms -2.2%
future-settle-early-3 1.071 ms 1.046 ms -2.3%
future-settle-early-4 1.120 ms 1.103 ms -1.5%
game-sm-success_1-1 816.6 μs 797.1 μs -2.4%
game-sm-success_1-2 453.0 μs 437.0 μs -3.5%
game-sm-success_1-3 1.205 ms 1.176 ms -2.4%
game-sm-success_1-4 528.6 μs 513.6 μs -2.8%
game-sm-success_2-1 818.5 μs 794.8 μs -2.9%
game-sm-success_2-2 453.7 μs 436.7 μs -3.7%
game-sm-success_2-3 1.200 ms 1.170 ms -2.5%
game-sm-success_2-4 527.2 μs 511.1 μs -3.1%
game-sm-success_2-5 1.200 ms 1.173 ms -2.2%
game-sm-success_2-6 529.3 μs 512.7 μs -3.1%
multisig-sm-1 822.0 μs 799.0 μs -2.8%
multisig-sm-2 811.3 μs 784.4 μs -3.3%
multisig-sm-3 819.9 μs 794.8 μs -3.1%
multisig-sm-4 826.1 μs 801.7 μs -3.0%
multisig-sm-5 1.066 ms 1.043 ms -2.2%
multisig-sm-6 821.6 μs 803.2 μs -2.2%
multisig-sm-7 810.2 μs 788.2 μs -2.7%
multisig-sm-8 817.2 μs 796.0 μs -2.6%
multisig-sm-9 824.0 μs 805.8 μs -2.2%
multisig-sm-10 1.065 ms 1.043 ms -2.1%
ping-pong-1 678.1 μs 656.4 μs -3.2%
ping-pong-2 677.2 μs 655.9 μs -3.1%
ping-pong_2-1 435.2 μs 419.3 μs -3.7%
prism-1 379.0 μs 364.7 μs -3.8%
prism-2 876.0 μs 857.3 μs -2.1%
prism-3 755.8 μs 739.5 μs -2.2%
pubkey-1 322.7 μs 310.8 μs -3.7%
stablecoin_1-1 1.686 ms 1.636 ms -3.0%
stablecoin_1-2 443.0 μs 429.7 μs -3.0%
stablecoin_1-3 1.928 ms 1.861 ms -3.5%
stablecoin_1-4 470.8 μs 456.6 μs -3.0%
stablecoin_1-5 2.462 ms 2.386 ms -3.1%
stablecoin_1-6 586.9 μs 568.6 μs -3.1%
stablecoin_2-1 1.686 ms 1.645 ms -2.4%
stablecoin_2-2 445.1 μs 429.7 μs -3.5%
stablecoin_2-3 1.936 ms 1.872 ms -3.3%
stablecoin_2-4 471.5 μs 457.6 μs -2.9%
token-account-1 383.1 μs 370.8 μs -3.2%
token-account-2 676.4 μs 658.1 μs -2.7%
uniswap-1 758.6 μs 740.2 μs -2.4%
uniswap-2 467.1 μs 453.7 μs -2.9%
uniswap-3 3.113 ms 3.024 ms -2.9%
uniswap-4 766.0 μs 743.7 μs -2.9%
uniswap-5 2.244 ms 2.165 ms -3.5%
uniswap-6 728.5 μs 708.9 μs -2.7%
vesting-1 689.5 μs 673.6 μs -2.3%

@effectfully effectfully force-pushed the effectfully/optimize-KnownTypeIn branch 2 times, most recently from 0005a98 to 57e8588 Compare December 5, 2021 16:01
@effectfully
Copy link
Contributor Author

/benchmark

@effectfully effectfully force-pushed the effectfully/optimize-KnownTypeIn branch from 57e8588 to f2721f0 Compare December 5, 2021 16:11
@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and '57e8588c2' (PR)

Script b778f9a 57e8588 Change
auction_1-1 404.4 μs 402.0 μs -0.6%
auction_1-2 1.232 ms 1.214 ms -1.5%
auction_1-3 1.243 ms 1.214 ms -2.3%
auction_1-4 556.7 μs 538.2 μs -3.3%
auction_2-1 419.0 μs 406.9 μs -2.9%
auction_2-2 1.227 ms 1.204 ms -1.9%
auction_2-3 1.551 ms 1.521 ms -1.9%
auction_2-4 1.233 ms 1.212 ms -1.7%
auction_2-5 554.5 μs 537.1 μs -3.1%
crowdfunding-success-1 497.0 μs 477.9 μs -3.8%
crowdfunding-success-2 495.1 μs 471.6 μs -4.7%
crowdfunding-success-3 494.7 μs 471.0 μs -4.8%
currency-1 499.2 μs 477.2 μs -4.4%
escrow-redeem_1-1 769.3 μs 723.9 μs -5.9%
escrow-redeem_1-2 770.7 μs 724.2 μs -6.0%
escrow-redeem_2-1 881.6 μs 830.8 μs -5.8%
escrow-redeem_2-2 882.8 μs 829.6 μs -6.0%
escrow-redeem_2-3 877.2 μs 829.8 μs -5.4%
escrow-refund-1 367.3 μs 342.1 μs -6.9%
future-increase-margin-1 500.5 μs 477.1 μs -4.7%
future-increase-margin-2 1.111 ms 1.046 ms -5.9%
future-increase-margin-3 1.112 ms 1.047 ms -5.8%
future-increase-margin-4 1.017 ms 953.9 μs -6.2%
future-increase-margin-5 1.488 ms 1.404 ms -5.6%
future-pay-out-1 501.7 μs 479.4 μs -4.4%
future-pay-out-2 1.090 ms 1.051 ms -3.6%
future-pay-out-3 1.091 ms 1.052 ms -3.6%
future-pay-out-4 1.460 ms 1.406 ms -3.7%
future-settle-early-1 493.9 μs 477.1 μs -3.4%
future-settle-early-2 1.087 ms 1.050 ms -3.4%
future-settle-early-3 1.093 ms 1.052 ms -3.8%
future-settle-early-4 1.151 ms 1.105 ms -4.0%
game-sm-success_1-1 841.4 μs 798.0 μs -5.2%
game-sm-success_1-2 463.3 μs 438.5 μs -5.4%
game-sm-success_1-3 1.220 ms 1.177 ms -3.5%
game-sm-success_1-4 539.8 μs 515.5 μs -4.5%
game-sm-success_2-1 848.9 μs 797.1 μs -6.1%
game-sm-success_2-2 468.8 μs 437.8 μs -6.6%
game-sm-success_2-3 1.242 ms 1.179 ms -5.1%
game-sm-success_2-4 544.6 μs 515.4 μs -5.4%
game-sm-success_2-5 1.243 ms 1.177 ms -5.3%
game-sm-success_2-6 546.1 μs 514.1 μs -5.9%
multisig-sm-1 845.4 μs 799.4 μs -5.4%
multisig-sm-2 837.0 μs 787.8 μs -5.9%
multisig-sm-3 842.7 μs 801.0 μs -4.9%
multisig-sm-4 851.8 μs 809.1 μs -5.0%
multisig-sm-5 1.101 ms 1.051 ms -4.5%
multisig-sm-6 849.5 μs 805.1 μs -5.2%
multisig-sm-7 834.9 μs 790.5 μs -5.3%
multisig-sm-8 844.4 μs 800.5 μs -5.2%
multisig-sm-9 853.7 μs 806.9 μs -5.5%
multisig-sm-10 1.106 ms 1.047 ms -5.3%
ping-pong-1 703.8 μs 659.2 μs -6.3%
ping-pong-2 702.5 μs 657.5 μs -6.4%
ping-pong_2-1 451.4 μs 421.4 μs -6.6%
prism-1 389.6 μs 367.3 μs -5.7%
prism-2 901.2 μs 860.7 μs -4.5%
prism-3 777.5 μs 743.1 μs -4.4%
pubkey-1 330.2 μs 313.3 μs -5.1%
stablecoin_1-1 1.727 ms 1.632 ms -5.5%
stablecoin_1-2 457.4 μs 430.6 μs -5.9%
stablecoin_1-3 1.984 ms 1.863 ms -6.1%
stablecoin_1-4 486.2 μs 457.6 μs -5.9%
stablecoin_1-5 2.551 ms 2.378 ms -6.8%
stablecoin_1-6 604.2 μs 567.5 μs -6.1%
stablecoin_2-1 1.729 ms 1.643 ms -5.0%
stablecoin_2-2 457.9 μs 432.1 μs -5.6%
stablecoin_2-3 1.984 ms 1.872 ms -5.6%
stablecoin_2-4 486.8 μs 459.4 μs -5.6%
token-account-1 394.7 μs 375.3 μs -4.9%
token-account-2 698.8 μs 660.9 μs -5.4%
uniswap-1 785.2 μs 748.3 μs -4.7%
uniswap-2 483.2 μs 457.7 μs -5.3%
uniswap-3 3.227 ms 3.005 ms -6.9%
uniswap-4 790.2 μs 745.1 μs -5.7%
uniswap-5 2.315 ms 2.163 ms -6.6%
uniswap-6 752.6 μs 709.5 μs -5.7%
vesting-1 713.5 μs 674.7 μs -5.4%

@effectfully effectfully force-pushed the effectfully/optimize-KnownTypeIn branch from f2721f0 to 69ea808 Compare December 5, 2021 17:50
@effectfully
Copy link
Contributor Author

/benchmark

@effectfully effectfully force-pushed the effectfully/optimize-KnownTypeIn branch from 69ea808 to 4ee1dc5 Compare December 5, 2021 17:58
@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and 'f2721f05d' (PR)

Script b778f9a f2721f0 Change
auction_1-1 413.8 μs 395.9 μs -4.3%
auction_1-2 1.222 ms 1.176 ms -3.8%
auction_1-3 1.226 ms 1.180 ms -3.8%
auction_1-4 549.6 μs 524.2 μs -4.6%
auction_2-1 414.0 μs 397.5 μs -4.0%
auction_2-2 1.215 ms 1.175 ms -3.3%
auction_2-3 1.536 ms 1.477 ms -3.8%
auction_2-4 1.223 ms 1.188 ms -2.9%
auction_2-5 548.9 μs 526.1 μs -4.2%
crowdfunding-success-1 484.2 μs 498.2 μs +2.9%
crowdfunding-success-2 481.1 μs 494.9 μs +2.9%
crowdfunding-success-3 482.6 μs 494.8 μs +2.5%
currency-1 484.6 μs 500.8 μs +3.3%
escrow-redeem_1-1 745.8 μs 784.9 μs +5.2%
escrow-redeem_1-2 744.9 μs 749.5 μs +0.6%
escrow-redeem_2-1 849.3 μs 866.9 μs +2.1%
escrow-redeem_2-2 848.3 μs 868.2 μs +2.3%
escrow-redeem_2-3 849.7 μs 860.6 μs +1.3%
escrow-refund-1 353.9 μs 355.6 μs +0.5%
future-increase-margin-1 483.5 μs 495.8 μs +2.5%
future-increase-margin-2 1.071 ms 1.099 ms +2.6%
future-increase-margin-3 1.070 ms 1.095 ms +2.3%
future-increase-margin-4 970.8 μs 990.9 μs +2.1%
future-increase-margin-5 1.424 ms 1.447 ms +1.6%
future-pay-out-1 484.6 μs 493.1 μs +1.8%
future-pay-out-2 1.070 ms 1.094 ms +2.2%
future-pay-out-3 1.072 ms 1.095 ms +2.1%
future-pay-out-4 1.420 ms 1.455 ms +2.5%
future-settle-early-1 499.2 μs 493.1 μs -1.2%
future-settle-early-2 1.109 ms 1.088 ms -1.9%
future-settle-early-3 1.107 ms 1.090 ms -1.5%
future-settle-early-4 1.160 ms 1.151 ms -0.8%
game-sm-success_1-1 844.6 μs 831.2 μs -1.6%
game-sm-success_1-2 470.6 μs 458.0 μs -2.7%
game-sm-success_1-3 1.242 ms 1.231 ms -0.9%
game-sm-success_1-4 546.0 μs 537.7 μs -1.5%
game-sm-success_2-1 847.5 μs 831.9 μs -1.8%
game-sm-success_2-2 465.2 μs 455.1 μs -2.2%
game-sm-success_2-3 1.235 ms 1.219 ms -1.3%
game-sm-success_2-4 541.2 μs 536.6 μs -0.8%
game-sm-success_2-5 1.242 ms 1.225 ms -1.4%
game-sm-success_2-6 546.4 μs 540.8 μs -1.0%
multisig-sm-1 849.4 μs 838.5 μs -1.3%
multisig-sm-2 835.4 μs 822.3 μs -1.6%
multisig-sm-3 845.2 μs 832.2 μs -1.5%
multisig-sm-4 854.2 μs 840.1 μs -1.7%
multisig-sm-5 1.100 ms 1.096 ms -0.4%
multisig-sm-6 847.0 μs 834.5 μs -1.5%
multisig-sm-7 842.1 μs 825.0 μs -2.0%
multisig-sm-8 846.1 μs 817.1 μs -3.4%
multisig-sm-9 856.4 μs 831.1 μs -3.0%
multisig-sm-10 1.104 ms 1.070 ms -3.1%
ping-pong-1 697.1 μs 678.2 μs -2.7%
ping-pong-2 701.0 μs 676.0 μs -3.6%
ping-pong_2-1 450.0 μs 434.9 μs -3.4%
prism-1 390.9 μs 376.0 μs -3.8%
prism-2 905.7 μs 885.9 μs -2.2%
prism-3 783.0 μs 761.3 μs -2.8%
pubkey-1 332.6 μs 323.1 μs -2.9%
stablecoin_1-1 1.746 ms 1.702 ms -2.5%
stablecoin_1-2 457.5 μs 445.6 μs -2.6%
stablecoin_1-3 1.988 ms 1.960 ms -1.4%
stablecoin_1-4 486.4 μs 474.1 μs -2.5%
stablecoin_1-5 2.545 ms 2.496 ms -1.9%
stablecoin_1-6 607.5 μs 586.8 μs -3.4%
stablecoin_2-1 1.758 ms 1.716 ms -2.4%
stablecoin_2-2 458.2 μs 449.1 μs -2.0%
stablecoin_2-3 2.004 ms 1.977 ms -1.3%
stablecoin_2-4 488.8 μs 478.9 μs -2.0%
token-account-1 394.0 μs 390.4 μs -0.9%
token-account-2 697.5 μs 688.3 μs -1.3%
uniswap-1 786.0 μs 775.8 μs -1.3%
uniswap-2 481.3 μs 473.2 μs -1.7%
uniswap-3 3.212 ms 3.148 ms -2.0%
uniswap-4 789.4 μs 782.1 μs -0.9%
uniswap-5 2.310 ms 2.271 ms -1.7%
uniswap-6 749.9 μs 742.9 μs -0.9%
vesting-1 715.3 μs 707.2 μs -1.1%

@effectfully
Copy link
Contributor Author

/benchmark

@effectfully effectfully force-pushed the effectfully/optimize-KnownTypeIn branch 2 times, most recently from 172e27d to 56ed505 Compare December 5, 2021 18:16
@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and 'abc363fcd' (PR)

Script b778f9a abc363f Change
auction_1-1 400.7 μs 390.2 μs -2.6%
auction_1-2 1.186 ms 1.164 ms -1.9%
auction_1-3 1.189 ms 1.167 ms -1.9%
auction_1-4 534.2 μs 518.1 μs -3.0%
auction_2-1 403.4 μs 393.0 μs -2.6%
auction_2-2 1.180 ms 1.172 ms -0.7%
auction_2-3 1.487 ms 1.470 ms -1.1%
auction_2-4 1.189 ms 1.172 ms -1.4%
auction_2-5 535.2 μs 517.9 μs -3.2%
crowdfunding-success-1 479.5 μs 463.3 μs -3.4%
crowdfunding-success-2 479.8 μs 463.2 μs -3.5%
crowdfunding-success-3 481.8 μs 464.1 μs -3.7%
currency-1 485.7 μs 475.2 μs -2.2%
escrow-redeem_1-1 742.3 μs 721.4 μs -2.8%
escrow-redeem_1-2 741.5 μs 719.5 μs -3.0%
escrow-redeem_2-1 848.3 μs 829.3 μs -2.2%
escrow-redeem_2-2 846.1 μs 828.5 μs -2.1%
escrow-redeem_2-3 847.6 μs 830.7 μs -2.0%
escrow-refund-1 352.9 μs 343.6 μs -2.6%
future-increase-margin-1 483.1 μs 476.5 μs -1.4%
future-increase-margin-2 1.066 ms 1.050 ms -1.5%
future-increase-margin-3 1.066 ms 1.050 ms -1.5%
future-increase-margin-4 975.1 μs 960.1 μs -1.5%
future-increase-margin-5 1.428 ms 1.406 ms -1.5%
future-pay-out-1 483.6 μs 476.4 μs -1.5%
future-pay-out-2 1.070 ms 1.048 ms -2.1%
future-pay-out-3 1.071 ms 1.047 ms -2.2%
future-pay-out-4 1.423 ms 1.398 ms -1.8%
future-settle-early-1 483.3 μs 474.4 μs -1.8%
future-settle-early-2 1.072 ms 1.050 ms -2.1%
future-settle-early-3 1.073 ms 1.053 ms -1.9%
future-settle-early-4 1.126 ms 1.109 ms -1.5%
game-sm-success_1-1 820.8 μs 800.2 μs -2.5%
game-sm-success_1-2 455.1 μs 439.9 μs -3.3%
game-sm-success_1-3 1.205 ms 1.181 ms -2.0%
game-sm-success_1-4 529.9 μs 514.9 μs -2.8%
game-sm-success_2-1 818.0 μs 796.7 μs -2.6%
game-sm-success_2-2 453.0 μs 437.8 μs -3.4%
game-sm-success_2-3 1.197 ms 1.175 ms -1.8%
game-sm-success_2-4 527.1 μs 513.2 μs -2.6%
game-sm-success_2-5 1.203 ms 1.174 ms -2.4%
game-sm-success_2-6 526.7 μs 511.2 μs -2.9%
multisig-sm-1 820.1 μs 798.5 μs -2.6%
multisig-sm-2 808.7 μs 789.2 μs -2.4%
multisig-sm-3 816.2 μs 797.1 μs -2.3%
multisig-sm-4 821.6 μs 801.9 μs -2.4%
multisig-sm-5 1.064 ms 1.041 ms -2.2%
multisig-sm-6 821.1 μs 800.0 μs -2.6%
multisig-sm-7 808.6 μs 785.1 μs -2.9%
multisig-sm-8 814.6 μs 795.5 μs -2.3%
multisig-sm-9 822.7 μs 806.6 μs -2.0%
multisig-sm-10 1.062 ms 1.048 ms -1.3%
ping-pong-1 677.0 μs 660.3 μs -2.5%
ping-pong-2 676.7 μs 659.0 μs -2.6%
ping-pong_2-1 433.6 μs 422.3 μs -2.6%
prism-1 378.6 μs 365.3 μs -3.5%
prism-2 879.7 μs 859.5 μs -2.3%
prism-3 757.6 μs 740.7 μs -2.2%
pubkey-1 321.4 μs 310.7 μs -3.3%
stablecoin_1-1 1.683 ms 1.635 ms -2.9%
stablecoin_1-2 443.0 μs 428.7 μs -3.2%
stablecoin_1-3 1.928 ms 1.868 ms -3.1%
stablecoin_1-4 470.8 μs 456.1 μs -3.1%
stablecoin_1-5 2.457 ms 2.389 ms -2.8%
stablecoin_1-6 583.6 μs 564.7 μs -3.2%
stablecoin_2-1 1.679 ms 1.640 ms -2.3%
stablecoin_2-2 441.4 μs 428.7 μs -2.9%
stablecoin_2-3 1.920 ms 1.868 ms -2.7%
stablecoin_2-4 470.0 μs 456.5 μs -2.9%
token-account-1 382.5 μs 373.8 μs -2.3%
token-account-2 675.0 μs 660.9 μs -2.1%
uniswap-1 755.0 μs 746.1 μs -1.2%
uniswap-2 465.0 μs 456.2 μs -1.9%
uniswap-3 3.124 ms 3.048 ms -2.4%
uniswap-4 764.5 μs 745.6 μs -2.5%
uniswap-5 2.249 ms 2.178 ms -3.2%
uniswap-6 729.4 μs 707.6 μs -3.0%
vesting-1 690.3 μs 675.5 μs -2.1%

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and '939df8b41' (PR)

Script b778f9a 939df8b Change
auction_1-1 401.1 μs 388.9 μs -3.0%
auction_1-2 1.181 ms 1.159 ms -1.9%
auction_1-3 1.182 ms 1.163 ms -1.6%
auction_1-4 533.8 μs 514.6 μs -3.6%
auction_2-1 404.3 μs 390.6 μs -3.4%
auction_2-2 1.184 ms 1.161 ms -1.9%
auction_2-3 1.490 ms 1.463 ms -1.8%
auction_2-4 1.188 ms 1.167 ms -1.8%
auction_2-5 534.9 μs 517.1 μs -3.3%
crowdfunding-success-1 480.5 μs 462.9 μs -3.7%
crowdfunding-success-2 479.4 μs 461.6 μs -3.7%
crowdfunding-success-3 480.0 μs 462.2 μs -3.7%
currency-1 483.1 μs 474.8 μs -1.7%
escrow-redeem_1-1 741.1 μs 718.4 μs -3.1%
escrow-redeem_1-2 740.6 μs 717.5 μs -3.1%
escrow-redeem_2-1 847.3 μs 825.3 μs -2.6%
escrow-redeem_2-2 846.3 μs 822.8 μs -2.8%
escrow-redeem_2-3 846.7 μs 824.5 μs -2.6%
escrow-refund-1 353.3 μs 340.6 μs -3.6%
future-increase-margin-1 484.4 μs 473.2 μs -2.3%
future-increase-margin-2 1.067 ms 1.043 ms -2.2%
future-increase-margin-3 1.066 ms 1.044 ms -2.1%
future-increase-margin-4 971.4 μs 952.6 μs -1.9%
future-increase-margin-5 1.421 ms 1.401 ms -1.4%
future-pay-out-1 485.1 μs 473.6 μs -2.4%
future-pay-out-2 1.075 ms 1.043 ms -3.0%
future-pay-out-3 1.074 ms 1.045 ms -2.7%
future-pay-out-4 1.425 ms 1.393 ms -2.2%
future-settle-early-1 485.4 μs 473.9 μs -2.4%
future-settle-early-2 1.072 ms 1.048 ms -2.2%
future-settle-early-3 1.071 ms 1.047 ms -2.2%
future-settle-early-4 1.119 ms 1.108 ms -1.0%
game-sm-success_1-1 818.5 μs 798.5 μs -2.4%
game-sm-success_1-2 454.9 μs 437.8 μs -3.8%
game-sm-success_1-3 1.198 ms 1.178 ms -1.7%
game-sm-success_1-4 526.6 μs 512.4 μs -2.7%
game-sm-success_2-1 816.5 μs 795.6 μs -2.6%
game-sm-success_2-2 452.2 μs 435.9 μs -3.6%
game-sm-success_2-3 1.201 ms 1.178 ms -1.9%
game-sm-success_2-4 527.5 μs 510.1 μs -3.3%
game-sm-success_2-5 1.200 ms 1.173 ms -2.2%
game-sm-success_2-6 528.1 μs 509.5 μs -3.5%
multisig-sm-1 817.9 μs 798.4 μs -2.4%
multisig-sm-2 808.0 μs 786.3 μs -2.7%
multisig-sm-3 813.7 μs 799.2 μs -1.8%
multisig-sm-4 820.3 μs 804.0 μs -2.0%
multisig-sm-5 1.064 ms 1.042 ms -2.1%
multisig-sm-6 820.6 μs 800.4 μs -2.5%
multisig-sm-7 809.8 μs 785.3 μs -3.0%
multisig-sm-8 818.4 μs 798.0 μs -2.5%
multisig-sm-9 823.9 μs 807.2 μs -2.0%
multisig-sm-10 1.064 ms 1.046 ms -1.7%
ping-pong-1 678.6 μs 658.1 μs -3.0%
ping-pong-2 679.0 μs 658.8 μs -3.0%
ping-pong_2-1 434.9 μs 420.5 μs -3.3%
prism-1 378.8 μs 363.5 μs -4.0%
prism-2 877.8 μs 856.6 μs -2.4%
prism-3 756.2 μs 737.0 μs -2.5%
pubkey-1 323.9 μs 311.1 μs -4.0%
stablecoin_1-1 1.679 ms 1.634 ms -2.7%
stablecoin_1-2 443.8 μs 427.2 μs -3.7%
stablecoin_1-3 1.926 ms 1.876 ms -2.6%
stablecoin_1-4 472.9 μs 454.7 μs -3.8%
stablecoin_1-5 2.467 ms 2.381 ms -3.5%
stablecoin_1-6 584.6 μs 563.1 μs -3.7%
stablecoin_2-1 1.683 ms 1.635 ms -2.9%
stablecoin_2-2 443.3 μs 426.9 μs -3.7%
stablecoin_2-3 1.927 ms 1.881 ms -2.4%
stablecoin_2-4 470.7 μs 456.1 μs -3.1%
token-account-1 383.6 μs 373.4 μs -2.7%
token-account-2 677.4 μs 658.1 μs -2.8%
uniswap-1 757.7 μs 748.8 μs -1.2%
uniswap-2 467.6 μs 457.0 μs -2.3%
uniswap-3 3.131 ms 3.052 ms -2.5%
uniswap-4 765.9 μs 743.7 μs -2.9%
uniswap-5 2.245 ms 2.175 ms -3.1%
uniswap-6 729.5 μs 709.1 μs -2.8%
vesting-1 689.4 μs 673.4 μs -2.3%

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and '14d14f416' (PR)

Script b778f9a 14d14f4 Change
auction_1-1 406.2 μs 388.4 μs -4.4%
auction_1-2 1.188 ms 1.169 ms -1.6%
auction_1-3 1.192 ms 1.173 ms -1.6%
auction_1-4 536.8 μs 519.5 μs -3.2%
auction_2-1 407.0 μs 391.4 μs -3.8%
auction_2-2 1.192 ms 1.170 ms -1.8%
auction_2-3 1.499 ms 1.468 ms -2.1%
auction_2-4 1.196 ms 1.173 ms -1.9%
auction_2-5 538.9 μs 517.0 μs -4.1%
crowdfunding-success-1 485.0 μs 460.4 μs -5.1%
crowdfunding-success-2 485.0 μs 459.9 μs -5.2%
crowdfunding-success-3 485.5 μs 460.4 μs -5.2%
currency-1 488.5 μs 474.3 μs -2.9%
escrow-redeem_1-1 746.9 μs 716.7 μs -4.0%
escrow-redeem_1-2 746.1 μs 716.5 μs -4.0%
escrow-redeem_2-1 850.7 μs 826.5 μs -2.8%
escrow-redeem_2-2 848.4 μs 826.3 μs -2.6%
escrow-redeem_2-3 852.5 μs 826.0 μs -3.1%
escrow-refund-1 355.9 μs 340.9 μs -4.2%
future-increase-margin-1 487.6 μs 474.6 μs -2.7%
future-increase-margin-2 1.075 ms 1.049 ms -2.4%
future-increase-margin-3 1.071 ms 1.048 ms -2.1%
future-increase-margin-4 977.1 μs 956.3 μs -2.1%
future-increase-margin-5 1.429 ms 1.405 ms -1.7%
future-pay-out-1 485.6 μs 474.1 μs -2.4%
future-pay-out-2 1.076 ms 1.047 ms -2.7%
future-pay-out-3 1.076 ms 1.047 ms -2.7%
future-pay-out-4 1.423 ms 1.398 ms -1.8%
future-settle-early-1 485.2 μs 474.4 μs -2.2%
future-settle-early-2 1.070 ms 1.047 ms -2.1%
future-settle-early-3 1.072 ms 1.045 ms -2.5%
future-settle-early-4 1.124 ms 1.105 ms -1.7%
game-sm-success_1-1 819.3 μs 799.2 μs -2.5%
game-sm-success_1-2 456.0 μs 438.2 μs -3.9%
game-sm-success_1-3 1.202 ms 1.182 ms -1.7%
game-sm-success_1-4 532.3 μs 512.7 μs -3.7%
game-sm-success_2-1 821.3 μs 799.0 μs -2.7%
game-sm-success_2-2 457.2 μs 437.0 μs -4.4%
game-sm-success_2-3 1.203 ms 1.180 ms -1.9%
game-sm-success_2-4 530.8 μs 512.7 μs -3.4%
game-sm-success_2-5 1.202 ms 1.183 ms -1.6%
game-sm-success_2-6 531.9 μs 512.0 μs -3.7%
multisig-sm-1 820.8 μs 799.0 μs -2.7%
multisig-sm-2 813.7 μs 785.7 μs -3.4%
multisig-sm-3 821.7 μs 798.5 μs -2.8%
multisig-sm-4 826.2 μs 804.3 μs -2.7%
multisig-sm-5 1.074 ms 1.046 ms -2.6%
multisig-sm-6 824.3 μs 800.7 μs -2.9%
multisig-sm-7 812.5 μs 787.5 μs -3.1%
multisig-sm-8 818.4 μs 794.9 μs -2.9%
multisig-sm-9 825.6 μs 806.1 μs -2.4%
multisig-sm-10 1.065 ms 1.051 ms -1.3%
ping-pong-1 679.6 μs 661.2 μs -2.7%
ping-pong-2 680.6 μs 659.6 μs -3.1%
ping-pong_2-1 436.7 μs 423.6 μs -3.0%
prism-1 380.6 μs 365.8 μs -3.9%
prism-2 878.9 μs 860.2 μs -2.1%
prism-3 760.2 μs 743.1 μs -2.2%
pubkey-1 324.3 μs 312.3 μs -3.7%
stablecoin_1-1 1.686 ms 1.643 ms -2.6%
stablecoin_1-2 446.0 μs 430.1 μs -3.6%
stablecoin_1-3 1.930 ms 1.875 ms -2.8%
stablecoin_1-4 474.0 μs 455.6 μs -3.9%
stablecoin_1-5 2.465 ms 2.392 ms -3.0%
stablecoin_1-6 588.3 μs 565.4 μs -3.9%
stablecoin_2-1 1.692 ms 1.647 ms -2.7%
stablecoin_2-2 447.6 μs 430.3 μs -3.9%
stablecoin_2-3 1.944 ms 1.881 ms -3.2%
stablecoin_2-4 475.4 μs 457.8 μs -3.7%
token-account-1 386.4 μs 373.5 μs -3.3%
token-account-2 682.6 μs 660.0 μs -3.3%
uniswap-1 759.7 μs 747.8 μs -1.6%
uniswap-2 469.3 μs 455.3 μs -3.0%
uniswap-3 3.135 ms 3.051 ms -2.7%
uniswap-4 768.1 μs 747.7 μs -2.7%
uniswap-5 2.247 ms 2.183 ms -2.8%
uniswap-6 732.3 μs 709.7 μs -3.1%
vesting-1 690.4 μs 677.6 μs -1.9%

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and '7c76ff8dc' (PR)

Script b778f9a 7c76ff8 Change
auction_1-1 403.3 μs 396.3 μs -1.7%
auction_1-2 1.180 ms 1.175 ms -0.4%
auction_1-3 1.185 ms 1.181 ms -0.3%
auction_1-4 534.1 μs 525.1 μs -1.7%
auction_2-1 403.2 μs 398.6 μs -1.1%
auction_2-2 1.180 ms 1.182 ms +0.2%
auction_2-3 1.488 ms 1.484 ms -0.3%
auction_2-4 1.187 ms 1.188 ms +0.1%
auction_2-5 535.5 μs 527.8 μs -1.4%
crowdfunding-success-1 481.3 μs 472.9 μs -1.7%
crowdfunding-success-2 480.1 μs 471.1 μs -1.9%
crowdfunding-success-3 481.9 μs 472.9 μs -1.9%
currency-1 484.0 μs 479.8 μs -0.9%
escrow-redeem_1-1 743.0 μs 729.9 μs -1.8%
escrow-redeem_1-2 741.2 μs 731.2 μs -1.3%
escrow-redeem_2-1 849.3 μs 841.3 μs -0.9%
escrow-redeem_2-2 850.4 μs 840.6 μs -1.2%
escrow-redeem_2-3 849.0 μs 838.9 μs -1.2%
escrow-refund-1 354.3 μs 348.1 μs -1.7%
future-increase-margin-1 485.6 μs 481.2 μs -0.9%
future-increase-margin-2 1.075 ms 1.062 ms -1.2%
future-increase-margin-3 1.074 ms 1.063 ms -1.0%
future-increase-margin-4 976.3 μs 964.7 μs -1.2%
future-increase-margin-5 1.424 ms 1.418 ms -0.4%
future-pay-out-1 483.6 μs 482.3 μs -0.3%
future-pay-out-2 1.070 ms 1.066 ms -0.4%
future-pay-out-3 1.073 ms 1.063 ms -0.9%
future-pay-out-4 1.424 ms 1.412 ms -0.8%
future-settle-early-1 484.6 μs 482.2 μs -0.5%
future-settle-early-2 1.071 ms 1.060 ms -1.0%
future-settle-early-3 1.070 ms 1.060 ms -0.9%
future-settle-early-4 1.118 ms 1.112 ms -0.5%
game-sm-success_1-1 817.7 μs 806.4 μs -1.4%
game-sm-success_1-2 454.5 μs 446.1 μs -1.8%
game-sm-success_1-3 1.206 ms 1.185 ms -1.7%
game-sm-success_1-4 531.9 μs 523.9 μs -1.5%
game-sm-success_2-1 821.6 μs 806.3 μs -1.9%
game-sm-success_2-2 456.5 μs 448.1 μs -1.8%
game-sm-success_2-3 1.206 ms 1.186 ms -1.7%
game-sm-success_2-4 531.0 μs 522.7 μs -1.6%
game-sm-success_2-5 1.204 ms 1.187 ms -1.4%
game-sm-success_2-6 529.7 μs 523.6 μs -1.2%
multisig-sm-1 819.5 μs 811.3 μs -1.0%
multisig-sm-2 811.0 μs 798.9 μs -1.5%
multisig-sm-3 816.1 μs 806.7 μs -1.2%
multisig-sm-4 823.2 μs 812.5 μs -1.3%
multisig-sm-5 1.061 ms 1.053 ms -0.8%
multisig-sm-6 818.2 μs 811.9 μs -0.8%
multisig-sm-7 811.1 μs 797.1 μs -1.7%
multisig-sm-8 816.5 μs 806.8 μs -1.2%
multisig-sm-9 827.0 μs 815.0 μs -1.5%
multisig-sm-10 1.063 ms 1.056 ms -0.7%
ping-pong-1 679.5 μs 666.5 μs -1.9%
ping-pong-2 678.3 μs 664.0 μs -2.1%
ping-pong_2-1 434.6 μs 429.4 μs -1.2%
prism-1 379.3 μs 374.1 μs -1.4%
prism-2 878.4 μs 872.6 μs -0.7%
prism-3 759.9 μs 752.1 μs -1.0%
pubkey-1 324.8 μs 322.2 μs -0.8%
stablecoin_1-1 1.689 ms 1.672 ms -1.0%
stablecoin_1-2 445.2 μs 439.3 μs -1.3%
stablecoin_1-3 1.933 ms 1.911 ms -1.1%
stablecoin_1-4 473.4 μs 467.9 μs -1.2%
stablecoin_1-5 2.479 ms 2.444 ms -1.4%
stablecoin_1-6 587.7 μs 577.8 μs -1.7%
stablecoin_2-1 1.680 ms 1.672 ms -0.5%
stablecoin_2-2 444.9 μs 439.8 μs -1.1%
stablecoin_2-3 1.928 ms 1.913 ms -0.8%
stablecoin_2-4 472.8 μs 467.4 μs -1.1%
token-account-1 383.9 μs 379.2 μs -1.2%
token-account-2 677.9 μs 669.2 μs -1.3%
uniswap-1 755.8 μs 752.4 μs -0.4%
uniswap-2 467.3 μs 464.1 μs -0.7%
uniswap-3 3.120 ms 3.057 ms -2.0%
uniswap-4 767.8 μs 761.6 μs -0.8%
uniswap-5 2.251 ms 2.204 ms -2.1%
uniswap-6 731.8 μs 724.0 μs -1.1%
vesting-1 691.7 μs 683.3 μs -1.2%

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and '7c76ff8dc' (PR)

Script b778f9a 7c76ff8 Change
auction_1-1 402.7 μs 395.6 μs -1.8%
auction_1-2 1.185 ms 1.178 ms -0.6%
auction_1-3 1.187 ms 1.186 ms -0.1%
auction_1-4 535.7 μs 528.4 μs -1.4%
auction_2-1 404.0 μs 399.9 μs -1.0%
auction_2-2 1.182 ms 1.180 ms -0.2%
auction_2-3 1.489 ms 1.482 ms -0.5%
auction_2-4 1.193 ms 1.193 ms 0.0%
auction_2-5 535.7 μs 528.0 μs -1.4%
crowdfunding-success-1 482.2 μs 472.6 μs -2.0%
crowdfunding-success-2 482.8 μs 471.4 μs -2.4%
crowdfunding-success-3 483.4 μs 471.7 μs -2.4%
currency-1 487.5 μs 480.4 μs -1.5%
escrow-redeem_1-1 745.8 μs 730.7 μs -2.0%
escrow-redeem_1-2 745.7 μs 733.7 μs -1.6%
escrow-redeem_2-1 851.8 μs 843.0 μs -1.0%
escrow-redeem_2-2 849.4 μs 839.2 μs -1.2%
escrow-redeem_2-3 850.3 μs 840.7 μs -1.1%
escrow-refund-1 354.0 μs 347.5 μs -1.8%
future-increase-margin-1 486.1 μs 481.3 μs -1.0%
future-increase-margin-2 1.074 ms 1.064 ms -0.9%
future-increase-margin-3 1.072 ms 1.064 ms -0.7%
future-increase-margin-4 975.6 μs 965.2 μs -1.1%
future-increase-margin-5 1.427 ms 1.417 ms -0.7%
future-pay-out-1 484.0 μs 481.8 μs -0.5%
future-pay-out-2 1.071 ms 1.065 ms -0.6%
future-pay-out-3 1.075 ms 1.061 ms -1.3%
future-pay-out-4 1.428 ms 1.410 ms -1.3%
future-settle-early-1 484.9 μs 479.9 μs -1.0%
future-settle-early-2 1.069 ms 1.060 ms -0.8%
future-settle-early-3 1.071 ms 1.058 ms -1.2%
future-settle-early-4 1.122 ms 1.112 ms -0.9%
game-sm-success_1-1 818.1 μs 804.9 μs -1.6%
game-sm-success_1-2 454.8 μs 445.6 μs -2.0%
game-sm-success_1-3 1.204 ms 1.184 ms -1.7%
game-sm-success_1-4 529.1 μs 523.5 μs -1.1%
game-sm-success_2-1 818.1 μs 803.9 μs -1.7%
game-sm-success_2-2 454.2 μs 444.8 μs -2.1%
game-sm-success_2-3 1.202 ms 1.184 ms -1.5%
game-sm-success_2-4 529.4 μs 522.7 μs -1.3%
game-sm-success_2-5 1.205 ms 1.189 ms -1.3%
game-sm-success_2-6 528.5 μs 523.3 μs -1.0%
multisig-sm-1 819.4 μs 809.3 μs -1.2%
multisig-sm-2 808.9 μs 796.2 μs -1.6%
multisig-sm-3 815.0 μs 804.7 μs -1.3%
multisig-sm-4 822.1 μs 811.7 μs -1.3%
multisig-sm-5 1.062 ms 1.049 ms -1.2%
multisig-sm-6 819.3 μs 810.8 μs -1.0%
multisig-sm-7 812.5 μs 796.5 μs -2.0%
multisig-sm-8 819.9 μs 804.4 μs -1.9%
multisig-sm-9 825.2 μs 813.0 μs -1.5%
multisig-sm-10 1.070 ms 1.051 ms -1.8%
ping-pong-1 680.4 μs 666.1 μs -2.1%
ping-pong-2 679.3 μs 667.5 μs -1.7%
ping-pong_2-1 436.0 μs 427.8 μs -1.9%
prism-1 378.8 μs 371.9 μs -1.8%
prism-2 875.5 μs 871.5 μs -0.5%
prism-3 757.0 μs 751.9 μs -0.7%
pubkey-1 322.6 μs 318.7 μs -1.2%
stablecoin_1-1 1.682 ms 1.667 ms -0.9%
stablecoin_1-2 443.8 μs 439.3 μs -1.0%
stablecoin_1-3 1.925 ms 1.911 ms -0.7%
stablecoin_1-4 470.7 μs 464.9 μs -1.2%
stablecoin_1-5 2.471 ms 2.444 ms -1.1%
stablecoin_1-6 586.7 μs 577.0 μs -1.7%
stablecoin_2-1 1.688 ms 1.676 ms -0.7%
stablecoin_2-2 444.3 μs 439.1 μs -1.2%
stablecoin_2-3 1.927 ms 1.914 ms -0.7%
stablecoin_2-4 471.7 μs 465.9 μs -1.2%
token-account-1 384.5 μs 379.2 μs -1.4%
token-account-2 680.3 μs 669.1 μs -1.6%
uniswap-1 758.7 μs 751.8 μs -0.9%
uniswap-2 468.9 μs 461.9 μs -1.5%
uniswap-3 3.118 ms 3.069 ms -1.6%
uniswap-4 764.8 μs 763.7 μs -0.1%
uniswap-5 2.240 ms 2.208 ms -1.4%
uniswap-6 728.0 μs 727.9 μs -0.0%
vesting-1 690.1 μs 684.7 μs -0.8%

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and '42f54ef29' (PR)

Script b778f9a 42f54ef Change
auction_1-1 400.6 μs 391.3 μs -2.3%
auction_1-2 1.178 ms 1.169 ms -0.8%
auction_1-3 1.183 ms 1.172 ms -0.9%
auction_1-4 533.5 μs 517.8 μs -2.9%
auction_2-1 403.0 μs 392.4 μs -2.6%
auction_2-2 1.181 ms 1.170 ms -0.9%
auction_2-3 1.483 ms 1.471 ms -0.8%
auction_2-4 1.182 ms 1.177 ms -0.4%
auction_2-5 532.5 μs 518.9 μs -2.6%
crowdfunding-success-1 478.1 μs 464.3 μs -2.9%
crowdfunding-success-2 479.9 μs 462.9 μs -3.5%
crowdfunding-success-3 480.9 μs 462.1 μs -3.9%
currency-1 485.3 μs 475.2 μs -2.1%
escrow-redeem_1-1 744.7 μs 720.1 μs -3.3%
escrow-redeem_1-2 742.5 μs 719.7 μs -3.1%
escrow-redeem_2-1 850.0 μs 828.7 μs -2.5%
escrow-redeem_2-2 847.6 μs 827.4 μs -2.4%
escrow-redeem_2-3 846.7 μs 828.9 μs -2.1%
escrow-refund-1 352.7 μs 340.6 μs -3.4%
future-increase-margin-1 481.6 μs 475.0 μs -1.4%
future-increase-margin-2 1.065 ms 1.049 ms -1.5%
future-increase-margin-3 1.068 ms 1.049 ms -1.8%
future-increase-margin-4 974.1 μs 958.5 μs -1.6%
future-increase-margin-5 1.423 ms 1.408 ms -1.1%
future-pay-out-1 483.5 μs 475.2 μs -1.7%
future-pay-out-2 1.069 ms 1.052 ms -1.6%
future-pay-out-3 1.067 ms 1.049 ms -1.7%
future-pay-out-4 1.419 ms 1.409 ms -0.7%
future-settle-early-1 483.1 μs 476.1 μs -1.4%
future-settle-early-2 1.068 ms 1.049 ms -1.8%
future-settle-early-3 1.069 ms 1.050 ms -1.8%
future-settle-early-4 1.124 ms 1.108 ms -1.4%
game-sm-success_1-1 820.0 μs 797.2 μs -2.8%
game-sm-success_1-2 455.5 μs 436.1 μs -4.3%
game-sm-success_1-3 1.203 ms 1.180 ms -1.9%
game-sm-success_1-4 528.7 μs 513.6 μs -2.9%
game-sm-success_2-1 817.8 μs 800.9 μs -2.1%
game-sm-success_2-2 454.0 μs 438.6 μs -3.4%
game-sm-success_2-3 1.201 ms 1.182 ms -1.6%
game-sm-success_2-4 528.1 μs 516.0 μs -2.3%
game-sm-success_2-5 1.200 ms 1.185 ms -1.2%
game-sm-success_2-6 527.1 μs 513.9 μs -2.5%
multisig-sm-1 819.1 μs 802.4 μs -2.0%
multisig-sm-2 807.0 μs 788.2 μs -2.3%
multisig-sm-3 814.0 μs 797.0 μs -2.1%
multisig-sm-4 820.0 μs 804.5 μs -1.9%
multisig-sm-5 1.061 ms 1.045 ms -1.5%
multisig-sm-6 817.1 μs 804.2 μs -1.6%
multisig-sm-7 809.4 μs 787.5 μs -2.7%
multisig-sm-8 816.0 μs 798.7 μs -2.1%
multisig-sm-9 822.5 μs 805.6 μs -2.1%
multisig-sm-10 1.063 ms 1.049 ms -1.3%
ping-pong-1 676.7 μs 660.9 μs -2.3%
ping-pong-2 675.8 μs 662.7 μs -1.9%
ping-pong_2-1 434.9 μs 423.3 μs -2.7%
prism-1 378.1 μs 365.8 μs -3.3%
prism-2 875.8 μs 863.4 μs -1.4%
prism-3 756.4 μs 745.4 μs -1.5%
pubkey-1 322.8 μs 312.3 μs -3.3%
stablecoin_1-1 1.690 ms 1.645 ms -2.7%
stablecoin_1-2 445.1 μs 431.9 μs -3.0%
stablecoin_1-3 1.924 ms 1.882 ms -2.2%
stablecoin_1-4 472.0 μs 457.0 μs -3.2%
stablecoin_1-5 2.461 ms 2.390 ms -2.9%
stablecoin_1-6 584.6 μs 564.2 μs -3.5%
stablecoin_2-1 1.682 ms 1.641 ms -2.4%
stablecoin_2-2 442.8 μs 429.2 μs -3.1%
stablecoin_2-3 1.922 ms 1.881 ms -2.1%
stablecoin_2-4 469.3 μs 456.8 μs -2.7%
token-account-1 382.7 μs 372.6 μs -2.6%
token-account-2 676.2 μs 659.2 μs -2.5%
uniswap-1 757.3 μs 747.2 μs -1.3%
uniswap-2 467.1 μs 454.7 μs -2.7%
uniswap-3 3.121 ms 3.040 ms -2.6%
uniswap-4 765.1 μs 746.3 μs -2.5%
uniswap-5 2.244 ms 2.188 ms -2.5%
uniswap-6 730.8 μs 708.8 μs -3.0%
vesting-1 690.9 μs 678.1 μs -1.9%

@effectfully
Copy link
Contributor Author

/benchmark

@iohk-devops
Copy link

Comparing benchmark results of 'b778f9abb' (base) and '726356c56' (PR)

Script b778f9a 726356c Change
auction_1-1 405.0 μs 392.7 μs -3.0%
auction_1-2 1.191 ms 1.169 ms -1.8%
auction_1-3 1.191 ms 1.175 ms -1.3%
auction_1-4 536.3 μs 522.3 μs -2.6%
auction_2-1 405.6 μs 395.5 μs -2.5%
auction_2-2 1.188 ms 1.169 ms -1.6%
auction_2-3 1.492 ms 1.470 ms -1.5%
auction_2-4 1.189 ms 1.174 ms -1.3%
auction_2-5 538.6 μs 521.8 μs -3.1%
crowdfunding-success-1 482.0 μs 465.4 μs -3.4%
crowdfunding-success-2 482.2 μs 465.4 μs -3.5%
crowdfunding-success-3 481.0 μs 466.3 μs -3.1%
currency-1 485.0 μs 477.5 μs -1.5%
escrow-redeem_1-1 743.0 μs 726.5 μs -2.2%
escrow-redeem_1-2 742.2 μs 725.1 μs -2.3%
escrow-redeem_2-1 850.4 μs 831.5 μs -2.2%
escrow-redeem_2-2 854.6 μs 829.5 μs -2.9%
escrow-redeem_2-3 853.3 μs 830.7 μs -2.6%
escrow-refund-1 355.7 μs 344.2 μs -3.2%
future-increase-margin-1 485.7 μs 476.7 μs -1.9%
future-increase-margin-2 1.077 ms 1.053 ms -2.2%
future-increase-margin-3 1.075 ms 1.055 ms -1.9%
future-increase-margin-4 976.0 μs 961.2 μs -1.5%
future-increase-margin-5 1.429 ms 1.407 ms -1.5%
future-pay-out-1 485.2 μs 478.7 μs -1.3%
future-pay-out-2 1.072 ms 1.056 ms -1.5%
future-pay-out-3 1.077 ms 1.056 ms -1.9%
future-pay-out-4 1.429 ms 1.405 ms -1.7%
future-settle-early-1 485.7 μs 478.9 μs -1.4%
future-settle-early-2 1.075 ms 1.052 ms -2.1%
future-settle-early-3 1.073 ms 1.052 ms -2.0%
future-settle-early-4 1.126 ms 1.107 ms -1.7%
game-sm-success_1-1 820.3 μs 800.3 μs -2.4%
game-sm-success_1-2 455.9 μs 439.9 μs -3.5%
game-sm-success_1-3 1.208 ms 1.177 ms -2.6%
game-sm-success_1-4 532.1 μs 516.9 μs -2.9%
game-sm-success_2-1 823.1 μs 797.1 μs -3.2%
game-sm-success_2-2 456.3 μs 439.6 μs -3.7%
game-sm-success_2-3 1.206 ms 1.183 ms -1.9%
game-sm-success_2-4 530.1 μs 515.9 μs -2.7%
game-sm-success_2-5 1.205 ms 1.179 ms -2.2%
game-sm-success_2-6 529.1 μs 515.5 μs -2.6%
multisig-sm-1 821.4 μs 804.3 μs -2.1%
multisig-sm-2 810.1 μs 794.6 μs -1.9%
multisig-sm-3 819.2 μs 802.2 μs -2.1%
multisig-sm-4 822.8 μs 808.7 μs -1.7%
multisig-sm-5 1.065 ms 1.052 ms -1.2%
multisig-sm-6 820.6 μs 804.6 μs -1.9%
multisig-sm-7 811.4 μs 790.6 μs -2.6%
multisig-sm-8 818.7 μs 798.3 μs -2.5%
multisig-sm-9 824.3 μs 807.6 μs -2.0%
multisig-sm-10 1.065 ms 1.046 ms -1.8%
ping-pong-1 678.4 μs 660.6 μs -2.6%
ping-pong-2 678.5 μs 660.6 μs -2.6%
ping-pong_2-1 435.9 μs 423.4 μs -2.9%
prism-1 380.0 μs 368.2 μs -3.1%
prism-2 884.6 μs 860.9 μs -2.7%
prism-3 760.8 μs 742.5 μs -2.4%
pubkey-1 323.7 μs 314.0 μs -3.0%
stablecoin_1-1 1.692 ms 1.635 ms -3.4%
stablecoin_1-2 445.7 μs 431.6 μs -3.2%
stablecoin_1-3 1.930 ms 1.876 ms -2.8%
stablecoin_1-4 473.4 μs 459.9 μs -2.9%
stablecoin_1-5 2.469 ms 2.389 ms -3.2%
stablecoin_1-6 586.4 μs 569.8 μs -2.8%
stablecoin_2-1 1.686 ms 1.645 ms -2.4%
stablecoin_2-2 445.6 μs 433.0 μs -2.8%
stablecoin_2-3 1.937 ms 1.871 ms -3.4%
stablecoin_2-4 475.0 μs 461.2 μs -2.9%
token-account-1 384.6 μs 375.7 μs -2.3%
token-account-2 677.8 μs 661.7 μs -2.4%
uniswap-1 759.0 μs 748.0 μs -1.4%
uniswap-2 467.1 μs 458.6 μs -1.8%
uniswap-3 3.131 ms 3.003 ms -4.1%
uniswap-4 769.9 μs 748.3 μs -2.8%
uniswap-5 2.259 ms 2.164 ms -4.2%
uniswap-6 734.5 μs 711.6 μs -3.1%
vesting-1 693.0 μs 677.1 μs -2.3%

@effectfully
Copy link
Contributor Author

effectfully commented Dec 26, 2021

This (bad results) is when I add readKnownConstant as a separate definition and inline it properly everywhere (including a call to inline). This (good results) is right after this commit where I simply manually inline readKnownConstant. This (good results) is where we have readKnownConstant, but also add -O2 to Universe.hs. Which is how I previously got good results: I simply forgot {-# OPTIONS_GHC -O2 -ddump-blah-blah-blah #-} in the code and right after removing that line I started to get bad results.

So what does -O2 in Universe change? I've no idea! I spent a couple of hours staring at GHC Core and the only difference I was able to find is how a KnownTypeIn instance for Int is compiled: it's a tad more efficient with -O2. But why would that make such a big difference in evaluation time that we can easily observe it? Do we do a lot of bytesting indexing/slicing or what? Seems unlikely, so I'm probably missing something.

Anyhow, I've chosen the version that was reliably fast previously (the one with -O2 in Universe.hs), added docs to it, stupidly merged master in, so that we can't compare things anymore without creating a separate PR and I'm calling it a day. I've spent way too much time here and given that there are major changes to make, it doesn't really make sense to over-obsess over little details. The good thing though is that I now have a much better idea of how compilation of builtins could be better.

Merging.

@effectfully effectfully merged commit c8c5183 into master Dec 26, 2021
@effectfully effectfully deleted the effectfully/optimize-KnownTypeIn branch December 26, 2021 09:44
@michaelpj
Copy link
Contributor

So what does -O2 in Universe change?

It might affect how the unfoldings are optimized (which isn't always easily visible in the Core). Which would then affect how good the code is when they get inlined? That's my best guess.

MaximilianAlgehed pushed a commit to Quviq/plutus that referenced this pull request Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants