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

[Evaluation] [Performance] Tweak 'safeIndexOne' #6663

Merged

Conversation

effectfully
Copy link
Contributor

Just being curious.

@effectfully effectfully self-assigned this Nov 14, 2024
@effectfully effectfully force-pushed the effectfully/evaluation/performance/tweak-safeIndexOne branch from 3d50fe5 to 1ec7b16 Compare November 14, 2024 02:22
@effectfully effectfully force-pushed the effectfully/evaluation/performance/tweak-safeIndexOne branch from 1ec7b16 to b5a6534 Compare November 14, 2024 13:41
@IntersectMBO IntersectMBO deleted a comment from github-actions bot Nov 14, 2024
@IntersectMBO IntersectMBO deleted a comment from github-actions bot Nov 14, 2024
@IntersectMBO IntersectMBO deleted a comment from github-actions bot Nov 14, 2024
@IntersectMBO IntersectMBO deleted a comment from github-actions bot Nov 14, 2024
@IntersectMBO IntersectMBO deleted a comment from github-actions bot Nov 14, 2024
@IntersectMBO IntersectMBO deleted a comment from github-actions bot Nov 14, 2024
@effectfully
Copy link
Contributor Author

/benchmark validation

Copy link
Contributor

Click here to check the status of your benchmark.

@effectfully
Copy link
Contributor Author

/benchmark validation

Copy link
Contributor

Comparing benchmark results of 'validation' on 'c082e28591' (base) and '1448b2a7c8' (PR)

Results table
Script c082e28 1448b2a Change
auction_1-1 261.8 μs 244.9 μs -6.5%
auction_1-2 919.1 μs 811.5 μs -11.7%
auction_1-3 912.4 μs 806.7 μs -11.6%
auction_1-4 339.2 μs 314.6 μs -7.3%
auction_2-1 263.1 μs 245.6 μs -6.7%
auction_2-2 919.0 μs 816.3 μs -11.2%
auction_2-3 1.204 ms 1.062 ms -11.8%
auction_2-4 913.6 μs 800.8 μs -12.3%
auction_2-5 339.1 μs 316.1 μs -6.8%
crowdfunding-success-1 307.8 μs 282.5 μs -8.2%
crowdfunding-success-2 308.3 μs 283.5 μs -8.0%
crowdfunding-success-3 307.7 μs 284.4 μs -7.6%
currency-1 364.6 μs 318.1 μs -12.8%
escrow-redeem_1-1 508.0 μs 455.8 μs -10.3%
escrow-redeem_1-2 507.7 μs 455.9 μs -10.2%
escrow-redeem_2-1 593.9 μs 531.0 μs -10.6%
escrow-redeem_2-2 596.5 μs 531.3 μs -10.9%
escrow-redeem_2-3 594.2 μs 530.1 μs -10.8%
escrow-refund-1 229.1 μs 210.5 μs -8.1%
future-increase-margin-1 363.1 μs 317.7 μs -12.5%
future-increase-margin-2 781.7 μs 691.3 μs -11.6%
future-increase-margin-3 781.5 μs 686.8 μs -12.1%
future-increase-margin-4 702.4 μs 630.9 μs -10.2%
future-increase-margin-5 1.167 ms 1.039 ms -11.0%
future-pay-out-1 363.2 μs 316.8 μs -12.8%
future-pay-out-2 777.5 μs 690.4 μs -11.2%
future-pay-out-3 780.3 μs 690.3 μs -11.5%
future-pay-out-4 1.163 ms 1.035 ms -11.0%
future-settle-early-1 361.6 μs 316.7 μs -12.4%
future-settle-early-2 779.7 μs 691.3 μs -11.3%
future-settle-early-3 782.7 μs 688.9 μs -12.0%
future-settle-early-4 867.3 μs 787.4 μs -9.2%
game-sm-success_1-1 560.6 μs 499.1 μs -11.0%
game-sm-success_1-2 294.6 μs 271.8 μs -7.7%
game-sm-success_1-3 920.4 μs 825.4 μs -10.3%
game-sm-success_1-4 345.5 μs 315.4 μs -8.7%
game-sm-success_2-1 560.5 μs 500.2 μs -10.8%
game-sm-success_2-2 295.2 μs 271.3 μs -8.1%
game-sm-success_2-3 919.0 μs 821.8 μs -10.6%
game-sm-success_2-4 345.6 μs 315.2 μs -8.8%
game-sm-success_2-5 919.1 μs 823.8 μs -10.4%
game-sm-success_2-6 344.9 μs 315.3 μs -8.6%
multisig-sm-1 570.0 μs 503.9 μs -11.6%
multisig-sm-2 558.6 μs 495.8 μs -11.2%
multisig-sm-3 562.8 μs 508.5 μs -9.6%
multisig-sm-4 570.5 μs 510.8 μs -10.5%
multisig-sm-5 802.6 μs 710.6 μs -11.5%
multisig-sm-6 570.2 μs 501.7 μs -12.0%
multisig-sm-7 556.6 μs 496.0 μs -10.9%
multisig-sm-8 561.8 μs 508.1 μs -9.6%
multisig-sm-9 569.5 μs 503.7 μs -11.6%
multisig-sm-10 802.0 μs 712.0 μs -11.2%
ping-pong-1 471.9 μs 426.4 μs -9.6%
ping-pong-2 472.8 μs 425.5 μs -10.0%
ping-pong_2-1 291.0 μs 264.9 μs -9.0%
prism-1 249.5 μs 227.9 μs -8.7%
prism-2 598.4 μs 536.0 μs -10.4%
prism-3 537.8 μs 474.9 μs -11.7%
pubkey-1 208.7 μs 194.3 μs -6.9%
stablecoin_1-1 1.304 ms 1.185 ms -9.1%
stablecoin_1-2 288.8 μs 265.0 μs -8.2%
stablecoin_1-3 1.509 ms 1.367 ms -9.4%
stablecoin_1-4 307.7 μs 280.1 μs -9.0%
stablecoin_1-5 1.950 ms 1.749 ms -10.3%
stablecoin_1-6 378.4 μs 349.5 μs -7.6%
stablecoin_2-1 1.304 ms 1.180 ms -9.5%
stablecoin_2-2 288.7 μs 265.7 μs -8.0%
stablecoin_2-3 1.506 ms 1.366 ms -9.3%
stablecoin_2-4 308.5 μs 281.7 μs -8.7%
token-account-1 273.5 μs 246.6 μs -9.8%
token-account-2 485.3 μs 437.6 μs -9.8%
uniswap-1 595.9 μs 520.6 μs -12.6%
uniswap-2 322.5 μs 292.4 μs -9.3%
uniswap-3 2.546 ms 2.245 ms -11.8%
uniswap-4 499.5 μs 451.9 μs -9.5%
uniswap-5 1.679 ms 1.494 ms -11.0%
uniswap-6 469.4 μs 433.2 μs -7.7%
vesting-1 502.4 μs 451.4 μs -10.2%
c082e28 1448b2a Change
TOTAL 51.04 ms 45.71 ms -10.4%

@effectfully
Copy link
Contributor Author

/benchmark nofib

1 similar comment
@effectfully
Copy link
Contributor Author

/benchmark nofib

@effectfully
Copy link
Contributor Author

/benchmark lists

1 similar comment
@effectfully
Copy link
Contributor Author

/benchmark lists

Copy link
Contributor

Click here to check the status of your benchmark.

Copy link
Contributor

Comparing benchmark results of 'validation' on 'c082e28591' (base) and '1448b2a7c8' (PR)

Results table
Script c082e28 1448b2a Change
auction_1-1 255.5 μs 244.3 μs -4.4%
auction_1-2 909.5 μs 813.5 μs -10.6%
auction_1-3 895.7 μs 807.0 μs -9.9%
auction_1-4 331.1 μs 315.0 μs -4.9%
auction_2-1 255.6 μs 244.1 μs -4.5%
auction_2-2 909.3 μs 812.8 μs -10.6%
auction_2-3 1.186 ms 1.060 ms -10.6%
auction_2-4 900.3 μs 800.2 μs -11.1%
auction_2-5 329.9 μs 314.5 μs -4.7%
crowdfunding-success-1 299.3 μs 282.3 μs -5.7%
crowdfunding-success-2 300.0 μs 284.6 μs -5.1%
crowdfunding-success-3 299.5 μs 283.0 μs -5.5%
currency-1 357.0 μs 316.8 μs -11.3%
escrow-redeem_1-1 497.3 μs 457.8 μs -7.9%
escrow-redeem_1-2 498.9 μs 455.0 μs -8.8%
escrow-redeem_2-1 581.5 μs 529.6 μs -8.9%
escrow-redeem_2-2 583.6 μs 528.8 μs -9.4%
escrow-redeem_2-3 582.6 μs 530.6 μs -8.9%
escrow-refund-1 223.5 μs 209.8 μs -6.1%
future-increase-margin-1 356.4 μs 318.0 μs -10.8%
future-increase-margin-2 767.9 μs 687.4 μs -10.5%
future-increase-margin-3 769.9 μs 685.7 μs -10.9%
future-increase-margin-4 691.4 μs 627.5 μs -9.2%
future-increase-margin-5 1.152 ms 1.042 ms -9.5%
future-pay-out-1 355.7 μs 317.7 μs -10.7%
future-pay-out-2 765.1 μs 690.3 μs -9.8%
future-pay-out-3 766.7 μs 690.9 μs -9.9%
future-pay-out-4 1.153 ms 1.036 ms -10.1%
future-settle-early-1 355.7 μs 317.4 μs -10.8%
future-settle-early-2 766.6 μs 689.9 μs -10.0%
future-settle-early-3 769.8 μs 690.8 μs -10.3%
future-settle-early-4 858.9 μs 785.8 μs -8.5%
game-sm-success_1-1 550.8 μs 498.1 μs -9.6%
game-sm-success_1-2 287.6 μs 271.1 μs -5.7%
game-sm-success_1-3 910.5 μs 821.2 μs -9.8%
game-sm-success_1-4 335.5 μs 314.8 μs -6.2%
game-sm-success_2-1 553.2 μs 500.5 μs -9.5%
game-sm-success_2-2 287.3 μs 271.0 μs -5.7%
game-sm-success_2-3 907.7 μs 824.0 μs -9.2%
game-sm-success_2-4 335.8 μs 316.6 μs -5.7%
game-sm-success_2-5 905.3 μs 823.7 μs -9.0%
game-sm-success_2-6 336.3 μs 314.9 μs -6.4%
multisig-sm-1 561.2 μs 507.0 μs -9.7%
multisig-sm-2 548.8 μs 495.6 μs -9.7%
multisig-sm-3 553.8 μs 509.7 μs -8.0%
multisig-sm-4 562.0 μs 509.7 μs -9.3%
multisig-sm-5 788.9 μs 710.3 μs -10.0%
multisig-sm-6 561.2 μs 502.7 μs -10.4%
multisig-sm-7 548.9 μs 495.4 μs -9.7%
multisig-sm-8 553.4 μs 505.4 μs -8.7%
multisig-sm-9 561.9 μs 506.4 μs -9.9%
multisig-sm-10 792.2 μs 708.6 μs -10.6%
ping-pong-1 464.1 μs 425.5 μs -8.3%
ping-pong-2 467.1 μs 423.5 μs -9.3%
ping-pong_2-1 285.4 μs 264.6 μs -7.3%
prism-1 242.4 μs 227.7 μs -6.1%
prism-2 587.7 μs 535.8 μs -8.8%
prism-3 527.3 μs 473.9 μs -10.1%
pubkey-1 203.9 μs 193.8 μs -5.0%
stablecoin_1-1 1.284 ms 1.186 ms -7.6%
stablecoin_1-2 281.0 μs 264.6 μs -5.8%
stablecoin_1-3 1.484 ms 1.363 ms -8.2%
stablecoin_1-4 299.2 μs 281.6 μs -5.9%
stablecoin_1-5 1.903 ms 1.750 ms -8.0%
stablecoin_1-6 369.0 μs 348.0 μs -5.7%
stablecoin_2-1 1.285 ms 1.185 ms -7.8%
stablecoin_2-2 281.8 μs 265.3 μs -5.9%
stablecoin_2-3 1.486 ms 1.365 ms -8.1%
stablecoin_2-4 299.8 μs 280.8 μs -6.3%
token-account-1 269.2 μs 247.6 μs -8.0%
token-account-2 477.7 μs 434.9 μs -9.0%
uniswap-1 589.4 μs 518.6 μs -12.0%
uniswap-2 316.0 μs 292.4 μs -7.5%
uniswap-3 2.510 ms 2.237 ms -10.9%
uniswap-4 483.7 μs 451.1 μs -6.7%
uniswap-5 1.647 ms 1.492 ms -9.4%
uniswap-6 457.5 μs 432.6 μs -5.4%
vesting-1 493.3 μs 449.0 μs -9.0%
c082e28 1448b2a Change
TOTAL 50.16 ms 45.67 ms -9.0%

@IntersectMBO IntersectMBO deleted a comment from github-actions bot Nov 14, 2024
@IntersectMBO IntersectMBO deleted a comment from github-actions bot Nov 19, 2024
@IntersectMBO IntersectMBO deleted a comment from github-actions bot Nov 19, 2024
@IntersectMBO IntersectMBO deleted a comment from github-actions bot Nov 19, 2024
@IntersectMBO IntersectMBO deleted a comment from github-actions bot Nov 19, 2024
@effectfully
Copy link
Contributor Author

/benchmark nofib

Copy link
Contributor

Click here to check the status of your benchmark.

@effectfully
Copy link
Contributor Author

/benchmark lists

@effectfully
Copy link
Contributor Author

/benchmark validation

1 similar comment
@effectfully
Copy link
Contributor Author

/benchmark validation

Copy link
Contributor

Comparing benchmark results of 'nofib' on '223cca3c6f' (base) and 'e939f7dcb5' (PR)

Results table
Script 223cca3 e939f7d Change
clausify/formula1 4.375 ms 3.707 ms -15.3%
clausify/formula2 5.833 ms 4.997 ms -14.3%
clausify/formula3 15.94 ms 13.76 ms -13.7%
clausify/formula4 36.46 ms 32.15 ms -11.8%
clausify/formula5 77.26 ms 67.07 ms -13.2%
knights/4x4 25.28 ms 23.42 ms -7.4%
knights/6x6 66.04 ms 59.91 ms -9.3%
knights/8x8 116.0 ms 104.7 ms -9.7%
primetest/05digits 14.98 ms 13.83 ms -7.7%
primetest/10digits 29.14 ms 27.11 ms -7.0%
primetest/30digits 89.66 ms 83.58 ms -6.8%
primetest/50digits 147.5 ms 138.3 ms -6.2%
queens4x4/bt 7.641 ms 6.728 ms -11.9%
queens4x4/bm 9.681 ms 8.413 ms -13.1%
queens4x4/bjbt1 9.268 ms 8.115 ms -12.4%
queens4x4/bjbt2 8.682 ms 7.604 ms -12.4%
queens4x4/fc 19.58 ms 16.83 ms -14.0%
queens5x5/bt 104.2 ms 92.30 ms -11.4%
queens5x5/bm 108.6 ms 95.11 ms -12.4%
queens5x5/bjbt1 121.5 ms 107.0 ms -11.9%
queens5x5/bjbt2 117.5 ms 103.9 ms -11.6%
queens5x5/fc 249.1 ms 213.5 ms -14.3%
223cca3 e939f7d Change
TOTAL 1.384 s 1.232 s -11.0%

Copy link
Contributor

Click here to check the status of your benchmark.

Copy link
Contributor

Comparing benchmark results of 'lists' on '223cca3c6f' (base) and 'e939f7dcb5' (PR)

Results table
Script 223cca3 e939f7d Change
sort/ghcSort/50 340.7 μs 290.1 μs -14.9%
sort/ghcSort/100 798.4 μs 672.3 μs -15.8%
sort/ghcSort/150 1.381 ms 1.166 ms -15.6%
sort/ghcSort/200 1.856 ms 1.566 ms -15.6%
sort/ghcSort/250 2.402 ms 2.025 ms -15.7%
sort/ghcSort/300 3.164 ms 2.668 ms -15.7%
sort/insertionSort/50 1.136 ms 1.003 ms -11.7%
sort/insertionSort/100 4.531 ms 4.009 ms -11.5%
sort/insertionSort/150 10.23 ms 9.032 ms -11.7%
sort/insertionSort/200 18.25 ms 16.11 ms -11.7%
sort/insertionSort/250 28.68 ms 25.26 ms -11.9%
sort/insertionSort/300 41.44 ms 36.52 ms -11.9%
sort/mergeSort/50 986.2 μs 887.7 μs -10.0%
sort/mergeSort/100 2.271 ms 2.046 ms -9.9%
sort/mergeSort/150 3.653 ms 3.294 ms -9.8%
sort/mergeSort/200 5.134 ms 4.637 ms -9.7%
sort/mergeSort/250 6.710 ms 6.070 ms -9.5%
sort/mergeSort/300 8.207 ms 7.393 ms -9.9%
sort/quickSort/50 2.784 ms 2.438 ms -12.4%
sort/quickSort/100 11.30 ms 9.961 ms -11.8%
sort/quickSort/150 25.27 ms 22.47 ms -11.1%
sort/quickSort/200 44.80 ms 39.79 ms -11.2%
sort/quickSort/250 70.12 ms 62.49 ms -10.9%
sort/quickSort/300 101.3 ms 90.40 ms -10.8%
sum/compiled-from-Haskell/sum-right-builtin/100 131.9 μs 115.9 μs -12.1%
sum/compiled-from-Haskell/sum-right-builtin/500 678.2 μs 611.4 μs -9.8%
sum/compiled-from-Haskell/sum-right-builtin/1000 1.448 ms 1.296 ms -10.5%
sum/compiled-from-Haskell/sum-right-builtin/2500 4.306 ms 3.976 ms -7.7%
sum/compiled-from-Haskell/sum-right-builtin/5000 9.245 ms 8.559 ms -7.4%
sum/compiled-from-Haskell/sum-right-Scott/100 89.22 μs 76.49 μs -14.3%
sum/compiled-from-Haskell/sum-right-Scott/500 469.6 μs 399.9 μs -14.8%
sum/compiled-from-Haskell/sum-right-Scott/1000 1.047 ms 862.2 μs -17.7%
sum/compiled-from-Haskell/sum-right-Scott/2500 3.296 ms 2.842 ms -13.8%
sum/compiled-from-Haskell/sum-right-Scott/5000 7.323 ms 6.780 ms -7.4%
sum/compiled-from-Haskell/sum-right-data/100 394.4 μs 378.7 μs -4.0%
sum/compiled-from-Haskell/sum-right-data/500 2.183 ms 2.067 ms -5.3%
sum/compiled-from-Haskell/sum-right-data/1000 4.848 ms 4.623 ms -4.6%
sum/compiled-from-Haskell/sum-right-data/2500 12.94 ms 12.41 ms -4.1%
sum/compiled-from-Haskell/sum-right-data/5000 26.84 ms 25.97 ms -3.2%
sum/compiled-from-Haskell/sum-left-builtin/100 127.7 μs 113.0 μs -11.5%
sum/compiled-from-Haskell/sum-left-builtin/500 665.4 μs 597.3 μs -10.2%
sum/compiled-from-Haskell/sum-left-builtin/1000 1.411 ms 1.263 ms -10.5%
sum/compiled-from-Haskell/sum-left-builtin/2500 4.229 ms 3.805 ms -10.0%
sum/compiled-from-Haskell/sum-left-builtin/5000 9.188 ms 8.277 ms -9.9%
sum/compiled-from-Haskell/sum-left-Scott/100 87.48 μs 74.45 μs -14.9%
sum/compiled-from-Haskell/sum-left-Scott/500 459.2 μs 390.5 μs -15.0%
sum/compiled-from-Haskell/sum-left-Scott/1000 987.9 μs 839.3 μs -15.0%
sum/compiled-from-Haskell/sum-left-Scott/2500 3.176 ms 2.710 ms -14.7%
sum/compiled-from-Haskell/sum-left-Scott/5000 7.236 ms 6.384 ms -11.8%
sum/compiled-from-Haskell/sum-left-data/100 407.3 μs 379.6 μs -6.8%
sum/compiled-from-Haskell/sum-left-data/500 2.258 ms 2.090 ms -7.4%
sum/compiled-from-Haskell/sum-left-data/1000 5.016 ms 4.695 ms -6.4%
sum/compiled-from-Haskell/sum-left-data/2500 13.26 ms 12.62 ms -4.8%
sum/compiled-from-Haskell/sum-left-data/5000 27.95 ms 26.42 ms -5.5%
sum/hand-written-PLC/sum-right-builtin/100 92.03 μs 80.10 μs -13.0%
sum/hand-written-PLC/sum-right-builtin/500 464.8 μs 403.9 μs -13.1%
sum/hand-written-PLC/sum-right-builtin/1000 952.5 μs 830.2 μs -12.8%
sum/hand-written-PLC/sum-right-builtin/2500 2.751 ms 2.376 ms -13.6%
sum/hand-written-PLC/sum-right-builtin/5000 5.920 ms 5.239 ms -11.5%
sum/hand-written-PLC/sum-right-Scott/100 74.22 μs 58.93 μs -20.6%
sum/hand-written-PLC/sum-right-Scott/500 377.5 μs 294.7 μs -21.9%
sum/hand-written-PLC/sum-right-Scott/1000 782.7 μs 619.5 μs -20.9%
sum/hand-written-PLC/sum-right-Scott/2500 2.376 ms 1.851 ms -22.1%
sum/hand-written-PLC/sum-right-Scott/5000 5.565 ms 4.648 ms -16.5%
sum/hand-written-PLC/sum-left-builtin/100 98.41 μs 83.20 μs -15.5%
sum/hand-written-PLC/sum-left-builtin/500 489.4 μs 410.3 μs -16.2%
sum/hand-written-PLC/sum-left-builtin/1000 961.8 μs 833.7 μs -13.3%
sum/hand-written-PLC/sum-left-builtin/2500 2.411 ms 2.040 ms -15.4%
sum/hand-written-PLC/sum-left-builtin/5000 4.785 ms 4.067 ms -15.0%
sum/hand-written-PLC/sum-left-Scott/100 80.77 μs 63.97 μs -20.8%
sum/hand-written-PLC/sum-left-Scott/500 398.4 μs 318.0 μs -20.2%
sum/hand-written-PLC/sum-left-Scott/1000 799.3 μs 646.0 μs -19.2%
sum/hand-written-PLC/sum-left-Scott/2500 2.269 ms 1.802 ms -20.6%
sum/hand-written-PLC/sum-left-Scott/5000 4.945 ms 4.045 ms -18.2%
223cca3 e939f7d Change
TOTAL 585.0 ms 524.5 ms -10.3%

Copy link
Contributor

Click here to check the status of your benchmark.

Copy link
Contributor

Comparing benchmark results of 'validation' on '223cca3c6f' (base) and 'e939f7dcb5' (PR)

Results table
Script 223cca3 e939f7d Change
auction_1-1 255.9 μs 239.0 μs -6.6%
auction_1-2 913.2 μs 788.5 μs -13.7%
auction_1-3 899.0 μs 772.1 μs -14.1%
auction_1-4 330.8 μs 313.9 μs -5.1%
auction_2-1 256.8 μs 239.4 μs -6.8%
auction_2-2 912.6 μs 785.3 μs -13.9%
auction_2-3 1.187 ms 1.020 ms -14.1%
auction_2-4 903.3 μs 771.8 μs -14.6%
auction_2-5 330.8 μs 308.6 μs -6.7%
crowdfunding-success-1 298.9 μs 278.5 μs -6.8%
crowdfunding-success-2 300.1 μs 279.0 μs -7.0%
crowdfunding-success-3 300.4 μs 278.8 μs -7.2%
currency-1 357.6 μs 313.6 μs -12.3%
escrow-redeem_1-1 500.1 μs 438.3 μs -12.4%
escrow-redeem_1-2 499.1 μs 437.2 μs -12.4%
escrow-redeem_2-1 585.0 μs 510.3 μs -12.8%
escrow-redeem_2-2 583.2 μs 509.9 μs -12.6%
escrow-redeem_2-3 586.8 μs 512.0 μs -12.7%
escrow-refund-1 223.9 μs 206.7 μs -7.7%
future-increase-margin-1 357.1 μs 314.5 μs -11.9%
future-increase-margin-2 768.9 μs 667.4 μs -13.2%
future-increase-margin-3 768.6 μs 666.5 μs -13.3%
future-increase-margin-4 691.2 μs 605.1 μs -12.5%
future-increase-margin-5 1.155 ms 1.006 ms -12.9%
future-pay-out-1 357.3 μs 314.2 μs -12.1%
future-pay-out-2 766.4 μs 668.0 μs -12.8%
future-pay-out-3 766.4 μs 665.7 μs -13.1%
future-pay-out-4 1.151 ms 1.014 ms -11.9%
future-settle-early-1 356.8 μs 314.6 μs -11.8%
future-settle-early-2 767.3 μs 668.4 μs -12.9%
future-settle-early-3 769.7 μs 669.3 μs -13.0%
future-settle-early-4 861.9 μs 754.2 μs -12.5%
game-sm-success_1-1 554.4 μs 498.1 μs -10.2%
game-sm-success_1-2 288.1 μs 267.9 μs -7.0%
game-sm-success_1-3 908.3 μs 787.4 μs -13.3%
game-sm-success_1-4 337.2 μs 312.0 μs -7.5%
game-sm-success_2-1 553.3 μs 489.3 μs -11.6%
game-sm-success_2-2 287.2 μs 269.6 μs -6.1%
game-sm-success_2-3 910.2 μs 790.9 μs -13.1%
game-sm-success_2-4 336.4 μs 312.4 μs -7.1%
game-sm-success_2-5 910.5 μs 786.1 μs -13.7%
game-sm-success_2-6 337.0 μs 312.3 μs -7.3%
multisig-sm-1 562.1 μs 494.9 μs -12.0%
multisig-sm-2 548.6 μs 493.3 μs -10.1%
multisig-sm-3 553.5 μs 486.3 μs -12.1%
multisig-sm-4 563.6 μs 494.6 μs -12.2%
multisig-sm-5 791.4 μs 688.9 μs -13.0%
multisig-sm-6 563.0 μs 495.9 μs -11.9%
multisig-sm-7 548.8 μs 491.5 μs -10.4%
multisig-sm-8 553.3 μs 486.4 μs -12.1%
multisig-sm-9 562.2 μs 497.9 μs -11.4%
multisig-sm-10 791.1 μs 681.9 μs -13.8%
ping-pong-1 464.3 μs 412.8 μs -11.1%
ping-pong-2 467.2 μs 414.0 μs -11.4%
ping-pong_2-1 286.4 μs 258.5 μs -9.7%
prism-1 243.1 μs 227.2 μs -6.5%
prism-2 589.1 μs 521.6 μs -11.5%
prism-3 530.7 μs 468.4 μs -11.7%
pubkey-1 206.3 μs 190.1 μs -7.9%
stablecoin_1-1 1.287 ms 1.146 ms -11.0%
stablecoin_1-2 282.5 μs 261.5 μs -7.4%
stablecoin_1-3 1.482 ms 1.321 ms -10.9%
stablecoin_1-4 300.7 μs 279.4 μs -7.1%
stablecoin_1-5 1.915 ms 1.680 ms -12.3%
stablecoin_1-6 370.4 μs 343.3 μs -7.3%
stablecoin_2-1 1.284 ms 1.149 ms -10.5%
stablecoin_2-2 282.1 μs 262.0 μs -7.1%
stablecoin_2-3 1.487 ms 1.313 ms -11.7%
stablecoin_2-4 300.1 μs 279.7 μs -6.8%
token-account-1 269.4 μs 243.8 μs -9.5%
token-account-2 477.6 μs 434.3 μs -9.1%
uniswap-1 587.7 μs 500.0 μs -14.9%
uniswap-2 316.5 μs 286.3 μs -9.5%
uniswap-3 2.509 ms 2.138 ms -14.8%
uniswap-4 486.5 μs 443.2 μs -8.9%
uniswap-5 1.650 ms 1.436 ms -13.0%
uniswap-6 459.0 μs 422.3 μs -8.0%
vesting-1 496.6 μs 434.8 μs -12.4%
223cca3 e939f7d Change
TOTAL 50.25 ms 44.33 ms -11.8%

Copy link
Contributor

Click here to check the status of your benchmark.

Copy link
Contributor

Comparing benchmark results of 'validation' on '223cca3c6f' (base) and 'e939f7dcb5' (PR)

Results table
Script 223cca3 e939f7d Change
auction_1-1 259.3 μs 240.2 μs -7.4%
auction_1-2 918.4 μs 787.1 μs -14.3%
auction_1-3 908.0 μs 773.9 μs -14.8%
auction_1-4 335.6 μs 319.1 μs -4.9%
auction_2-1 261.2 μs 239.9 μs -8.2%
auction_2-2 918.5 μs 787.7 μs -14.2%
auction_2-3 1.199 ms 1.021 ms -14.8%
auction_2-4 912.2 μs 772.2 μs -15.3%
auction_2-5 336.0 μs 312.4 μs -7.0%
crowdfunding-success-1 305.1 μs 285.7 μs -6.4%
crowdfunding-success-2 305.4 μs 280.5 μs -8.2%
crowdfunding-success-3 305.5 μs 280.0 μs -8.3%
currency-1 362.2 μs 314.1 μs -13.3%
escrow-redeem_1-1 506.7 μs 439.9 μs -13.2%
escrow-redeem_1-2 507.6 μs 439.7 μs -13.4%
escrow-redeem_2-1 590.5 μs 513.0 μs -13.1%
escrow-redeem_2-2 591.6 μs 511.3 μs -13.6%
escrow-redeem_2-3 591.7 μs 511.8 μs -13.5%
escrow-refund-1 227.5 μs 207.0 μs -9.0%
future-increase-margin-1 362.4 μs 315.3 μs -13.0%
future-increase-margin-2 781.1 μs 667.8 μs -14.5%
future-increase-margin-3 778.0 μs 667.0 μs -14.3%
future-increase-margin-4 700.1 μs 605.3 μs -13.5%
future-increase-margin-5 1.163 ms 1.002 ms -13.8%
future-pay-out-1 360.1 μs 313.9 μs -12.8%
future-pay-out-2 775.1 μs 667.4 μs -13.9%
future-pay-out-3 776.1 μs 666.0 μs -14.2%
future-pay-out-4 1.158 ms 994.7 μs -14.1%
future-settle-early-1 360.3 μs 314.1 μs -12.8%
future-settle-early-2 778.3 μs 671.3 μs -13.7%
future-settle-early-3 778.3 μs 669.5 μs -14.0%
future-settle-early-4 867.4 μs 755.7 μs -12.9%
game-sm-success_1-1 558.7 μs 490.3 μs -12.2%
game-sm-success_1-2 292.6 μs 269.5 μs -7.9%
game-sm-success_1-3 920.6 μs 787.8 μs -14.4%
game-sm-success_1-4 342.7 μs 313.3 μs -8.6%
game-sm-success_2-1 559.4 μs 499.4 μs -10.7%
game-sm-success_2-2 292.6 μs 269.3 μs -8.0%
game-sm-success_2-3 918.1 μs 785.6 μs -14.4%
game-sm-success_2-4 342.5 μs 313.2 μs -8.6%
game-sm-success_2-5 918.4 μs 787.0 μs -14.3%
game-sm-success_2-6 343.0 μs 312.2 μs -9.0%
multisig-sm-1 570.1 μs 495.2 μs -13.1%
multisig-sm-2 556.5 μs 492.8 μs -11.4%
multisig-sm-3 561.5 μs 485.8 μs -13.5%
multisig-sm-4 567.4 μs 494.9 μs -12.8%
multisig-sm-5 800.7 μs 681.5 μs -14.9%
multisig-sm-6 568.3 μs 493.5 μs -13.2%
multisig-sm-7 556.3 μs 486.2 μs -12.6%
multisig-sm-8 560.0 μs 488.5 μs -12.8%
multisig-sm-9 569.2 μs 496.7 μs -12.7%
multisig-sm-10 800.8 μs 684.4 μs -14.5%
ping-pong-1 470.4 μs 414.5 μs -11.9%
ping-pong-2 470.3 μs 422.5 μs -10.2%
ping-pong_2-1 290.2 μs 263.5 μs -9.2%
prism-1 247.3 μs 227.4 μs -8.0%
prism-2 598.7 μs 520.7 μs -13.0%
prism-3 536.4 μs 467.4 μs -12.9%
pubkey-1 207.5 μs 190.5 μs -8.2%
stablecoin_1-1 1.303 ms 1.152 ms -11.6%
stablecoin_1-2 286.5 μs 262.1 μs -8.5%
stablecoin_1-3 1.509 ms 1.337 ms -11.4%
stablecoin_1-4 306.5 μs 281.4 μs -8.2%
stablecoin_1-5 1.949 ms 1.684 ms -13.6%
stablecoin_1-6 376.2 μs 344.0 μs -8.6%
stablecoin_2-1 1.306 ms 1.145 ms -12.3%
stablecoin_2-2 287.0 μs 263.2 μs -8.3%
stablecoin_2-3 1.511 ms 1.333 ms -11.8%
stablecoin_2-4 305.8 μs 281.2 μs -8.0%
token-account-1 272.5 μs 243.3 μs -10.7%
token-account-2 484.2 μs 426.5 μs -11.9%
uniswap-1 593.5 μs 499.7 μs -15.8%
uniswap-2 320.4 μs 286.8 μs -10.5%
uniswap-3 2.567 ms 2.144 ms -16.5%
uniswap-4 493.8 μs 444.8 μs -9.9%
uniswap-5 1.694 ms 1.442 ms -14.9%
uniswap-6 467.6 μs 422.7 μs -9.6%
vesting-1 499.8 μs 436.3 μs -12.7%
223cca3 e939f7d Change
TOTAL 50.93 ms 44.41 ms -12.8%

@effectfully
Copy link
Contributor Author

Well, seems like making it worker-wrapper-friendly allowed us to claw a few more percent out of cold GHC hands. Pretty great!

@effectfully effectfully merged commit 22f6a47 into master Nov 21, 2024
8 checks passed
@effectfully effectfully deleted the effectfully/evaluation/performance/tweak-safeIndexOne branch November 21, 2024 03:55
safeIndexOneCont z f = findTree where
findTree :: RAList a -> Word64 -> b
-- See Note [Optimizations of safeIndexOneCont].
findTree Nil !_ = z
Copy link
Contributor

@bezirg bezirg Dec 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why you need to bang the wildcard here: findTree Nil !_ (amazing results btw)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in the referenced Note:

Bangs in the local definitions of 'safeIndexOneCont' are needed to tell GHC that the functions are
strict in the 'Word64' argument, so that GHC produces workers operating on @Word64#@.

Otherwise GHC doesn't know that it can unbox the second argument.

Comment on lines +881 to +885
Env.safeIndexOneCont
(throwingWithCause _MachineError OpenTermEvaluatedMachineError . Just $ Var () varName)
pure
varEnv
(coerce varIx)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that it matters, but place this change also on the SteppableCek (for trying to keep the code similar :D )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, thank you.

@bezirg
Copy link
Contributor

bezirg commented Dec 2, 2024

There is a criterion benchmark inside index-envs if you want to use it. I will try to run it myself to see the before and after numbers

@effectfully
Copy link
Contributor Author

There is a criterion benchmark inside index-envs if you want to use it. I will try to run it myself to see the before and after numbers

I personally don't really care. The CEK machine is significantly faster and that's enough for me.

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.

3 participants