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] [Names] Define all lookups in terms of 'contIndexZero' #6702

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

effectfully
Copy link
Contributor

@effectfully effectfully commented Nov 21, 2024

Instead of 4 different implementation this will make it 1 main and 3 derivative ones.

This appears to make the validation benchmarks faster by a percent and the nofib benchmarks faster by a couple of percent while simplifying the code, so a clear win.

Please review this one VERY carefully.

@effectfully
Copy link
Contributor Author

/benchmark validation

@effectfully
Copy link
Contributor Author

/benchmark nofib

@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 'efaadc5ce9' (base) and '40a378f84b' (PR)

Results table
Script efaadc5 40a378f Change
auction_1-1 237.1 μs 234.6 μs -1.1%
auction_1-2 781.3 μs 772.9 μs -1.1%
auction_1-3 772.2 μs 757.9 μs -1.9%
auction_1-4 307.3 μs 302.8 μs -1.5%
auction_2-1 237.4 μs 233.8 μs -1.5%
auction_2-2 783.4 μs 770.1 μs -1.7%
auction_2-3 1.018 ms 995.1 μs -2.2%
auction_2-4 771.1 μs 758.9 μs -1.6%
auction_2-5 306.2 μs 303.1 μs -1.0%
crowdfunding-success-1 278.7 μs 275.1 μs -1.3%
crowdfunding-success-2 278.6 μs 275.1 μs -1.3%
crowdfunding-success-3 278.3 μs 275.1 μs -1.1%
currency-1 312.4 μs 308.4 μs -1.3%
escrow-redeem_1-1 437.5 μs 434.8 μs -0.6%
escrow-redeem_1-2 438.3 μs 432.5 μs -1.3%
escrow-redeem_2-1 509.3 μs 502.7 μs -1.3%
escrow-redeem_2-2 507.9 μs 501.9 μs -1.2%
escrow-redeem_2-3 509.5 μs 503.1 μs -1.3%
escrow-refund-1 205.6 μs 204.3 μs -0.6%
future-increase-margin-1 310.8 μs 307.5 μs -1.1%
future-increase-margin-2 663.6 μs 658.2 μs -0.8%
future-increase-margin-3 662.0 μs 656.8 μs -0.8%
future-increase-margin-4 598.4 μs 594.4 μs -0.7%
future-increase-margin-5 999.1 μs 989.0 μs -1.0%
future-pay-out-1 310.0 μs 308.1 μs -0.6%
future-pay-out-2 664.2 μs 657.5 μs -1.0%
future-pay-out-3 662.5 μs 657.3 μs -0.8%
future-pay-out-4 1.005 ms 978.6 μs -2.6%
future-settle-early-1 310.0 μs 308.0 μs -0.6%
future-settle-early-2 663.3 μs 655.3 μs -1.2%
future-settle-early-3 664.7 μs 658.3 μs -1.0%
future-settle-early-4 755.5 μs 742.4 μs -1.7%
game-sm-success_1-1 486.3 μs 478.1 μs -1.7%
game-sm-success_1-2 267.2 μs 263.8 μs -1.3%
game-sm-success_1-3 790.6 μs 766.4 μs -3.1%
game-sm-success_1-4 309.7 μs 307.9 μs -0.6%
game-sm-success_2-1 489.0 μs 484.8 μs -0.9%
game-sm-success_2-2 266.8 μs 264.2 μs -1.0%
game-sm-success_2-3 790.4 μs 768.3 μs -2.8%
game-sm-success_2-4 310.2 μs 307.2 μs -1.0%
game-sm-success_2-5 789.2 μs 768.9 μs -2.6%
game-sm-success_2-6 310.3 μs 307.0 μs -1.1%
multisig-sm-1 492.9 μs 487.4 μs -1.1%
multisig-sm-2 484.1 μs 478.7 μs -1.1%
multisig-sm-3 481.2 μs 475.9 μs -1.1%
multisig-sm-4 492.4 μs 488.9 μs -0.7%
multisig-sm-5 684.8 μs 669.7 μs -2.2%
multisig-sm-6 496.9 μs 489.6 μs -1.5%
multisig-sm-7 486.2 μs 478.7 μs -1.5%
multisig-sm-8 481.3 μs 485.7 μs +0.9%
multisig-sm-9 492.5 μs 488.2 μs -0.9%
multisig-sm-10 692.6 μs 670.1 μs -3.2%
ping-pong-1 408.3 μs 404.7 μs -0.9%
ping-pong-2 407.8 μs 403.6 μs -1.0%
ping-pong_2-1 255.8 μs 259.9 μs +1.6%
prism-1 230.4 μs 224.0 μs -2.8%
prism-2 517.2 μs 516.1 μs -0.2%
prism-3 465.3 μs 462.5 μs -0.6%
pubkey-1 189.1 μs 188.4 μs -0.4%
stablecoin_1-1 1.146 ms 1.127 ms -1.7%
stablecoin_1-2 259.1 μs 256.3 μs -1.1%
stablecoin_1-3 1.315 ms 1.298 ms -1.3%
stablecoin_1-4 277.2 μs 283.7 μs +2.3%
stablecoin_1-5 1.664 ms 1.644 ms -1.2%
stablecoin_1-6 339.5 μs 337.2 μs -0.7%
stablecoin_2-1 1.137 ms 1.130 ms -0.6%
stablecoin_2-2 259.5 μs 256.9 μs -1.0%
stablecoin_2-3 1.329 ms 1.304 ms -1.9%
stablecoin_2-4 277.3 μs 274.9 μs -0.9%
token-account-1 241.1 μs 238.2 μs -1.2%
token-account-2 424.7 μs 419.2 μs -1.3%
uniswap-1 490.6 μs 489.1 μs -0.3%
uniswap-2 281.3 μs 280.0 μs -0.5%
uniswap-3 2.142 ms 2.093 ms -2.3%
uniswap-4 441.3 μs 443.1 μs +0.4%
uniswap-5 1.434 ms 1.413 ms -1.5%
uniswap-6 420.6 μs 417.9 μs -0.6%
vesting-1 434.0 μs 437.5 μs +0.8%
efaadc5 40a378f Change
TOTAL 44.12 ms 43.55 ms -1.3%

Copy link
Contributor

Click here to check the status of your benchmark.

Copy link
Contributor

Comparing benchmark results of 'nofib' on 'efaadc5ce9' (base) and '40a378f84b' (PR)

Results table
Script efaadc5 40a378f Change
clausify/formula1 3.740 ms 3.623 ms -3.1%
clausify/formula2 5.007 ms 4.870 ms -2.7%
clausify/formula3 13.80 ms 13.42 ms -2.8%
clausify/formula4 32.29 ms 31.45 ms -2.6%
clausify/formula5 66.87 ms 65.17 ms -2.5%
knights/4x4 23.14 ms 22.49 ms -2.8%
knights/6x6 60.07 ms 57.74 ms -3.9%
knights/8x8 105.5 ms 101.4 ms -3.9%
primetest/05digits 13.80 ms 13.89 ms +0.7%
primetest/10digits 26.94 ms 27.02 ms +0.3%
primetest/30digits 83.71 ms 83.42 ms -0.3%
primetest/50digits 137.5 ms 137.5 ms 0.0%
queens4x4/bt 6.869 ms 6.648 ms -3.2%
queens4x4/bm 8.488 ms 8.281 ms -2.4%
queens4x4/bjbt1 8.238 ms 8.000 ms -2.9%
queens4x4/bjbt2 7.758 ms 7.520 ms -3.1%
queens4x4/fc 17.05 ms 16.66 ms -2.3%
queens5x5/bt 93.71 ms 91.05 ms -2.8%
queens5x5/bm 96.04 ms 93.93 ms -2.2%
queens5x5/bjbt1 108.6 ms 105.7 ms -2.7%
queens5x5/bjbt2 106.0 ms 102.9 ms -2.9%
queens5x5/fc 216.2 ms 211.6 ms -2.1%
efaadc5 40a378f Change
TOTAL 1.241 s 1.214 s -2.2%

Copy link
Contributor

Click here to check the status of your benchmark.

Copy link
Contributor

Comparing benchmark results of 'lists' on 'efaadc5ce9' (base) and '40a378f84b' (PR)

Results table
Script efaadc5 40a378f Change
sort/ghcSort/50 287.7 μs 288.0 μs +0.1%
sort/ghcSort/100 670.6 μs 669.7 μs -0.1%
sort/ghcSort/150 1.160 ms 1.160 ms 0.0%
sort/ghcSort/200 1.559 ms 1.556 ms -0.2%
sort/ghcSort/250 2.018 ms 2.017 ms -0.0%
sort/ghcSort/300 2.653 ms 2.654 ms +0.0%
sort/insertionSort/50 987.0 μs 980.2 μs -0.7%
sort/insertionSort/100 3.955 ms 3.926 ms -0.7%
sort/insertionSort/150 8.911 ms 8.846 ms -0.7%
sort/insertionSort/200 15.91 ms 15.77 ms -0.9%
sort/insertionSort/250 24.99 ms 24.93 ms -0.2%
sort/insertionSort/300 36.10 ms 35.95 ms -0.4%
sort/mergeSort/50 894.0 μs 887.6 μs -0.7%
sort/mergeSort/100 2.053 ms 2.042 ms -0.5%
sort/mergeSort/150 3.302 ms 3.287 ms -0.5%
sort/mergeSort/200 4.645 ms 4.599 ms -1.0%
sort/mergeSort/250 6.077 ms 6.047 ms -0.5%
sort/mergeSort/300 7.412 ms 7.366 ms -0.6%
sort/quickSort/50 2.388 ms 2.367 ms -0.9%
sort/quickSort/100 9.769 ms 9.657 ms -1.1%
sort/quickSort/150 22.02 ms 21.80 ms -1.0%
sort/quickSort/200 39.01 ms 38.44 ms -1.5%
sort/quickSort/250 61.35 ms 60.56 ms -1.3%
sort/quickSort/300 88.54 ms 87.28 ms -1.4%
sum/compiled-from-Haskell/sum-right-builtin/100 114.3 μs 114.5 μs +0.2%
sum/compiled-from-Haskell/sum-right-builtin/500 606.4 μs 605.3 μs -0.2%
sum/compiled-from-Haskell/sum-right-builtin/1000 1.286 ms 1.285 ms -0.1%
sum/compiled-from-Haskell/sum-right-builtin/2500 3.950 ms 3.946 ms -0.1%
sum/compiled-from-Haskell/sum-right-builtin/5000 8.528 ms 8.502 ms -0.3%
sum/compiled-from-Haskell/sum-right-Scott/100 75.14 μs 73.42 μs -2.3%
sum/compiled-from-Haskell/sum-right-Scott/500 393.5 μs 385.6 μs -2.0%
sum/compiled-from-Haskell/sum-right-Scott/1000 848.3 μs 831.6 μs -2.0%
sum/compiled-from-Haskell/sum-right-Scott/2500 2.813 ms 2.762 ms -1.8%
sum/compiled-from-Haskell/sum-right-Scott/5000 6.745 ms 6.650 ms -1.4%
sum/compiled-from-Haskell/sum-right-data/100 378.9 μs 394.6 μs +4.1%
sum/compiled-from-Haskell/sum-right-data/500 2.070 ms 2.131 ms +2.9%
sum/compiled-from-Haskell/sum-right-data/1000 4.640 ms 4.767 ms +2.7%
sum/compiled-from-Haskell/sum-right-data/2500 12.46 ms 12.74 ms +2.2%
sum/compiled-from-Haskell/sum-right-data/5000 25.96 ms 26.57 ms +2.3%
sum/compiled-from-Haskell/sum-left-builtin/100 117.6 μs 113.7 μs -3.3%
sum/compiled-from-Haskell/sum-left-builtin/500 605.2 μs 598.1 μs -1.2%
sum/compiled-from-Haskell/sum-left-builtin/1000 1.268 ms 1.268 ms 0.0%
sum/compiled-from-Haskell/sum-left-builtin/2500 3.843 ms 3.855 ms +0.3%
sum/compiled-from-Haskell/sum-left-builtin/5000 8.538 ms 8.434 ms -1.2%
sum/compiled-from-Haskell/sum-left-Scott/100 73.40 μs 71.86 μs -2.1%
sum/compiled-from-Haskell/sum-left-Scott/500 385.8 μs 377.1 μs -2.3%
sum/compiled-from-Haskell/sum-left-Scott/1000 833.0 μs 815.5 μs -2.1%
sum/compiled-from-Haskell/sum-left-Scott/2500 2.679 ms 2.638 ms -1.5%
sum/compiled-from-Haskell/sum-left-Scott/5000 6.291 ms 6.245 ms -0.7%
sum/compiled-from-Haskell/sum-left-data/100 386.7 μs 391.2 μs +1.2%
sum/compiled-from-Haskell/sum-left-data/500 2.121 ms 2.145 ms +1.1%
sum/compiled-from-Haskell/sum-left-data/1000 4.759 ms 4.804 ms +0.9%
sum/compiled-from-Haskell/sum-left-data/2500 12.76 ms 12.85 ms +0.7%
sum/compiled-from-Haskell/sum-left-data/5000 26.71 ms 26.84 ms +0.5%
sum/hand-written-PLC/sum-right-builtin/100 79.28 μs 78.05 μs -1.6%
sum/hand-written-PLC/sum-right-builtin/500 399.6 μs 392.7 μs -1.7%
sum/hand-written-PLC/sum-right-builtin/1000 821.2 μs 808.8 μs -1.5%
sum/hand-written-PLC/sum-right-builtin/2500 2.365 ms 2.327 ms -1.6%
sum/hand-written-PLC/sum-right-builtin/5000 5.222 ms 5.130 ms -1.8%
sum/hand-written-PLC/sum-right-Scott/100 59.71 μs 56.03 μs -6.2%
sum/hand-written-PLC/sum-right-Scott/500 298.6 μs 289.0 μs -3.2%
sum/hand-written-PLC/sum-right-Scott/1000 626.1 μs 607.5 μs -3.0%
sum/hand-written-PLC/sum-right-Scott/2500 1.862 ms 1.818 ms -2.4%
sum/hand-written-PLC/sum-right-Scott/5000 4.652 ms 4.556 ms -2.1%
sum/hand-written-PLC/sum-left-builtin/100 83.64 μs 81.95 μs -2.0%
sum/hand-written-PLC/sum-left-builtin/500 410.5 μs 402.0 μs -2.1%
sum/hand-written-PLC/sum-left-builtin/1000 821.5 μs 803.7 μs -2.2%
sum/hand-written-PLC/sum-left-builtin/2500 2.046 ms 2.000 ms -2.2%
sum/hand-written-PLC/sum-left-builtin/5000 4.087 ms 3.995 ms -2.3%
sum/hand-written-PLC/sum-left-Scott/100 63.51 μs 63.00 μs -0.8%
sum/hand-written-PLC/sum-left-Scott/500 315.1 μs 314.7 μs -0.1%
sum/hand-written-PLC/sum-left-Scott/1000 638.0 μs 633.7 μs -0.7%
sum/hand-written-PLC/sum-left-Scott/2500 1.765 ms 1.758 ms -0.4%
sum/hand-written-PLC/sum-left-Scott/5000 4.004 ms 3.965 ms -1.0%
efaadc5 40a378f Change
TOTAL 519.5 ms 516.4 ms -0.6%

@effectfully
Copy link
Contributor Author

/benchmark nofib

2 similar comments
@effectfully
Copy link
Contributor Author

/benchmark nofib

@effectfully
Copy link
Contributor Author

/benchmark nofib

Copy link
Contributor

Click here to check the status of your benchmark.

Copy link
Contributor

Comparing benchmark results of 'nofib' on 'efaadc5ce9' (base) and '40a378f84b' (PR)

Results table
Script efaadc5 40a378f Change
clausify/formula1 3.746 ms 3.631 ms -3.1%
clausify/formula2 5.042 ms 4.878 ms -3.3%
clausify/formula3 13.77 ms 13.42 ms -2.5%
clausify/formula4 32.43 ms 31.57 ms -2.7%
clausify/formula5 67.16 ms 65.27 ms -2.8%
knights/4x4 23.28 ms 22.43 ms -3.7%
knights/6x6 60.30 ms 57.63 ms -4.4%
knights/8x8 105.7 ms 101.0 ms -4.4%
primetest/05digits 14.13 ms 13.85 ms -2.0%
primetest/10digits 27.70 ms 26.92 ms -2.8%
primetest/30digits 85.99 ms 83.19 ms -3.3%
primetest/50digits 140.8 ms 137.1 ms -2.6%
queens4x4/bt 6.865 ms 6.646 ms -3.2%
queens4x4/bm 8.524 ms 8.274 ms -2.9%
queens4x4/bjbt1 8.287 ms 8.010 ms -3.3%
queens4x4/bjbt2 7.810 ms 7.525 ms -3.6%
queens4x4/fc 17.17 ms 16.70 ms -2.7%
queens5x5/bt 94.24 ms 91.05 ms -3.4%
queens5x5/bm 98.02 ms 93.83 ms -4.3%
queens5x5/bjbt1 109.3 ms 105.6 ms -3.4%
queens5x5/bjbt2 106.0 ms 102.9 ms -2.9%
queens5x5/fc 216.5 ms 211.5 ms -2.3%
efaadc5 40a378f Change
TOTAL 1.253 s 1.213 s -3.2%

Copy link
Contributor

Click here to check the status of your benchmark.

Copy link
Contributor

Comparing benchmark results of 'nofib' on 'efaadc5ce9' (base) and '40a378f84b' (PR)

Results table
Script efaadc5 40a378f Change
clausify/formula1 3.733 ms 3.636 ms -2.6%
clausify/formula2 5.014 ms 4.884 ms -2.6%
clausify/formula3 13.82 ms 13.44 ms -2.7%
clausify/formula4 32.32 ms 31.63 ms -2.1%
clausify/formula5 67.01 ms 65.45 ms -2.3%
knights/4x4 23.25 ms 22.60 ms -2.8%
knights/6x6 60.19 ms 57.92 ms -3.8%
knights/8x8 105.8 ms 101.3 ms -4.3%
primetest/05digits 13.96 ms 13.98 ms +0.1%
primetest/10digits 27.21 ms 27.30 ms +0.3%
primetest/30digits 84.89 ms 83.77 ms -1.3%
primetest/50digits 139.6 ms 138.9 ms -0.5%
queens4x4/bt 6.884 ms 6.668 ms -3.1%
queens4x4/bm 8.510 ms 8.302 ms -2.4%
queens4x4/bjbt1 8.285 ms 8.034 ms -3.0%
queens4x4/bjbt2 7.784 ms 7.546 ms -3.1%
queens4x4/fc 17.13 ms 16.73 ms -2.3%
queens5x5/bt 94.15 ms 91.47 ms -2.8%
queens5x5/bm 96.25 ms 94.10 ms -2.2%
queens5x5/bjbt1 109.2 ms 106.0 ms -2.9%
queens5x5/bjbt2 106.3 ms 103.1 ms -3.0%
queens5x5/fc 216.2 ms 211.8 ms -2.0%
efaadc5 40a378f Change
TOTAL 1.247 s 1.219 s -2.3%

Copy link
Contributor

Click here to check the status of your benchmark.

Copy link
Contributor

Comparing benchmark results of 'nofib' on 'efaadc5ce9' (base) and '40a378f84b' (PR)

Results table
Script efaadc5 40a378f Change
clausify/formula1 3.713 ms 3.672 ms -1.1%
clausify/formula2 4.997 ms 4.950 ms -0.9%
clausify/formula3 13.67 ms 13.57 ms -0.7%
clausify/formula4 32.25 ms 31.97 ms -0.9%
clausify/formula5 66.67 ms 66.18 ms -0.7%
knights/4x4 23.06 ms 22.96 ms -0.4%
knights/6x6 59.81 ms 58.90 ms -1.5%
knights/8x8 105.3 ms 102.9 ms -2.3%
primetest/05digits 13.81 ms 14.45 ms +4.6%
primetest/10digits 26.96 ms 28.12 ms +4.3%
primetest/30digits 83.80 ms 86.72 ms +3.5%
primetest/50digits 138.6 ms 142.5 ms +2.8%
queens4x4/bt 6.816 ms 6.743 ms -1.1%
queens4x4/bm 8.458 ms 8.392 ms -0.8%
queens4x4/bjbt1 8.219 ms 8.107 ms -1.4%
queens4x4/bjbt2 7.746 ms 7.629 ms -1.5%
queens4x4/fc 17.11 ms 16.90 ms -1.2%
queens5x5/bt 93.61 ms 92.48 ms -1.2%
queens5x5/bm 95.78 ms 95.02 ms -0.8%
queens5x5/bjbt1 108.4 ms 107.1 ms -1.2%
queens5x5/bjbt2 105.5 ms 104.1 ms -1.3%
queens5x5/fc 215.2 ms 214.1 ms -0.5%
efaadc5 40a378f Change
TOTAL 1.239 s 1.237 s -0.2%

@zeme-wana
Copy link
Contributor

/benchmark lists

@zeme-wana
Copy link
Contributor

/benchmark nofib

@zeme-wana
Copy link
Contributor

/benchmark validation

Copy link
Contributor

Click here to check the status of your benchmark.

Copy link
Contributor

Comparing benchmark results of 'lists' on 'efaadc5ce' (base) and '40a378f84' (PR)

Results table
Script efaadc5 40a378f Change
sort/ghcSort/50 298.2 μs 288.7 μs -3.2%
sort/ghcSort/100 695.1 μs 670.7 μs -3.5%
sort/ghcSort/150 1.197 ms 1.162 ms -2.9%
sort/ghcSort/200 1.610 ms 1.562 ms -3.0%
sort/ghcSort/250 2.081 ms 2.019 ms -3.0%
sort/ghcSort/300 2.735 ms 2.659 ms -2.8%
sort/insertionSort/50 1.021 ms 982.9 μs -3.7%
sort/insertionSort/100 4.082 ms 3.937 ms -3.6%
sort/insertionSort/150 9.201 ms 8.901 ms -3.3%
sort/insertionSort/200 16.40 ms 15.89 ms -3.1%
sort/insertionSort/250 25.78 ms 24.99 ms -3.1%
sort/insertionSort/300 37.26 ms 36.07 ms -3.2%
sort/mergeSort/50 917.9 μs 892.8 μs -2.7%
sort/mergeSort/100 2.110 ms 2.049 ms -2.9%
sort/mergeSort/150 3.396 ms 3.304 ms -2.7%
sort/mergeSort/200 4.777 ms 4.626 ms -3.2%
sort/mergeSort/250 6.239 ms 6.078 ms -2.6%
sort/mergeSort/300 7.618 ms 7.399 ms -2.9%
sort/quickSort/50 2.468 ms 2.376 ms -3.7%
sort/quickSort/100 10.07 ms 9.680 ms -3.9%
sort/quickSort/150 22.71 ms 21.89 ms -3.6%
sort/quickSort/200 40.26 ms 38.61 ms -4.1%
sort/quickSort/250 63.22 ms 60.48 ms -4.3%
sort/quickSort/300 91.21 ms 87.30 ms -4.3%
sum/compiled-from-Haskell/sum-right-builtin/100 114.7 μs 115.0 μs +0.3%
sum/compiled-from-Haskell/sum-right-builtin/500 608.1 μs 606.6 μs -0.2%
sum/compiled-from-Haskell/sum-right-builtin/1000 1.287 ms 1.285 ms -0.2%
sum/compiled-from-Haskell/sum-right-builtin/2500 3.957 ms 3.956 ms -0.0%
sum/compiled-from-Haskell/sum-right-builtin/5000 8.528 ms 8.512 ms -0.2%
sum/compiled-from-Haskell/sum-right-Scott/100 74.86 μs 73.56 μs -1.7%
sum/compiled-from-Haskell/sum-right-Scott/500 393.6 μs 387.0 μs -1.7%
sum/compiled-from-Haskell/sum-right-Scott/1000 847.8 μs 834.4 μs -1.6%
sum/compiled-from-Haskell/sum-right-Scott/2500 2.816 ms 2.772 ms -1.6%
sum/compiled-from-Haskell/sum-right-Scott/5000 6.753 ms 6.678 ms -1.1%
sum/compiled-from-Haskell/sum-right-data/100 387.8 μs 391.9 μs +1.1%
sum/compiled-from-Haskell/sum-right-data/500 2.113 ms 2.119 ms +0.3%
sum/compiled-from-Haskell/sum-right-data/1000 4.735 ms 4.735 ms 0.0%
sum/compiled-from-Haskell/sum-right-data/2500 12.67 ms 12.78 ms +0.9%
sum/compiled-from-Haskell/sum-right-data/5000 26.42 ms 26.38 ms -0.2%
sum/compiled-from-Haskell/sum-left-builtin/100 113.7 μs 113.9 μs +0.2%
sum/compiled-from-Haskell/sum-left-builtin/500 598.4 μs 599.0 μs +0.1%
sum/compiled-from-Haskell/sum-left-builtin/1000 1.271 ms 1.271 ms 0.0%
sum/compiled-from-Haskell/sum-left-builtin/2500 3.848 ms 3.861 ms +0.3%
sum/compiled-from-Haskell/sum-left-builtin/5000 8.431 ms 8.472 ms +0.5%
sum/compiled-from-Haskell/sum-left-Scott/100 73.42 μs 72.07 μs -1.8%
sum/compiled-from-Haskell/sum-left-Scott/500 385.7 μs 378.4 μs -1.9%
sum/compiled-from-Haskell/sum-left-Scott/1000 833.8 μs 818.3 μs -1.9%
sum/compiled-from-Haskell/sum-left-Scott/2500 2.686 ms 2.653 ms -1.2%
sum/compiled-from-Haskell/sum-left-Scott/5000 6.320 ms 6.249 ms -1.1%
sum/compiled-from-Haskell/sum-left-data/100 394.5 μs 389.6 μs -1.2%
sum/compiled-from-Haskell/sum-left-data/500 2.160 ms 2.136 ms -1.1%
sum/compiled-from-Haskell/sum-left-data/1000 4.837 ms 4.790 ms -1.0%
sum/compiled-from-Haskell/sum-left-data/2500 12.95 ms 12.83 ms -0.9%
sum/compiled-from-Haskell/sum-left-data/5000 27.10 ms 26.79 ms -1.1%
sum/hand-written-PLC/sum-right-builtin/100 79.34 μs 78.30 μs -1.3%
sum/hand-written-PLC/sum-right-builtin/500 399.9 μs 393.3 μs -1.7%
sum/hand-written-PLC/sum-right-builtin/1000 822.8 μs 809.9 μs -1.6%
sum/hand-written-PLC/sum-right-builtin/2500 2.369 ms 2.332 ms -1.6%
sum/hand-written-PLC/sum-right-builtin/5000 5.227 ms 5.148 ms -1.5%
sum/hand-written-PLC/sum-right-Scott/100 59.54 μs 56.93 μs -4.4%
sum/hand-written-PLC/sum-right-Scott/500 298.6 μs 290.7 μs -2.6%
sum/hand-written-PLC/sum-right-Scott/1000 627.6 μs 610.4 μs -2.7%
sum/hand-written-PLC/sum-right-Scott/2500 1.862 ms 1.821 ms -2.2%
sum/hand-written-PLC/sum-right-Scott/5000 4.659 ms 4.579 ms -1.7%
sum/hand-written-PLC/sum-left-builtin/100 83.43 μs 82.08 μs -1.6%
sum/hand-written-PLC/sum-left-builtin/500 412.0 μs 403.5 μs -2.1%
sum/hand-written-PLC/sum-left-builtin/1000 822.6 μs 805.3 μs -2.1%
sum/hand-written-PLC/sum-left-builtin/2500 2.051 ms 2.005 ms -2.2%
sum/hand-written-PLC/sum-left-builtin/5000 4.091 ms 4.005 ms -2.1%
sum/hand-written-PLC/sum-left-Scott/100 63.58 μs 62.15 μs -2.2%
sum/hand-written-PLC/sum-left-Scott/500 315.7 μs 315.0 μs -0.2%
sum/hand-written-PLC/sum-left-Scott/1000 638.8 μs 636.3 μs -0.4%
sum/hand-written-PLC/sum-left-Scott/2500 1.766 ms 1.757 ms -0.5%
sum/hand-written-PLC/sum-left-Scott/5000 4.005 ms 3.986 ms -0.5%
efaadc5 40a378f Change
TOTAL 531.7 ms 517.0 ms -2.8%

Copy link
Contributor

Click here to check the status of your benchmark.

Copy link
Contributor

Comparing benchmark results of 'nofib' on 'efaadc5ce' (base) and '40a378f84' (PR)

Results table
Script efaadc5 40a378f Change
clausify/formula1 3.755 ms 3.647 ms -2.9%
clausify/formula2 5.051 ms 4.924 ms -2.5%
clausify/formula3 13.79 ms 13.48 ms -2.2%
clausify/formula4 32.43 ms 31.73 ms -2.2%
clausify/formula5 67.27 ms 65.65 ms -2.4%
knights/4x4 23.39 ms 22.56 ms -3.5%
knights/6x6 60.34 ms 58.02 ms -3.8%
knights/8x8 105.9 ms 101.6 ms -4.1%
primetest/05digits 13.94 ms 13.98 ms +0.3%
primetest/10digits 27.25 ms 27.32 ms +0.3%
primetest/30digits 84.99 ms 84.06 ms -1.1%
primetest/50digits 139.6 ms 139.2 ms -0.3%
queens4x4/bt 6.872 ms 6.681 ms -2.8%
queens4x4/bm 8.568 ms 8.332 ms -2.8%
queens4x4/bjbt1 8.287 ms 8.044 ms -2.9%
queens4x4/bjbt2 7.793 ms 7.559 ms -3.0%
queens4x4/fc 17.16 ms 16.76 ms -2.3%
queens5x5/bt 94.37 ms 91.65 ms -2.9%
queens5x5/bm 96.51 ms 94.18 ms -2.4%
queens5x5/bjbt1 109.4 ms 106.3 ms -2.8%
queens5x5/bjbt2 106.5 ms 103.4 ms -2.9%
queens5x5/fc 216.8 ms 212.5 ms -2.0%
efaadc5 40a378f Change
TOTAL 1.250 s 1.222 s -2.3%

Copy link
Contributor

Click here to check the status of your benchmark.

Copy link
Contributor

Comparing benchmark results of 'validation' on 'efaadc5ce' (base) and '40a378f84' (PR)

Results table
Script efaadc5 40a378f Change
auction_1-1 237.5 μs 235.8 μs -0.7%
auction_1-2 788.4 μs 774.9 μs -1.7%
auction_1-3 775.1 μs 762.9 μs -1.6%
auction_1-4 307.4 μs 304.5 μs -0.9%
auction_2-1 238.0 μs 235.6 μs -1.0%
auction_2-2 788.8 μs 774.3 μs -1.8%
auction_2-3 1.020 ms 1.000 ms -2.0%
auction_2-4 769.2 μs 762.7 μs -0.8%
auction_2-5 306.9 μs 305.4 μs -0.5%
crowdfunding-success-1 278.9 μs 278.1 μs -0.3%
crowdfunding-success-2 279.2 μs 277.4 μs -0.6%
crowdfunding-success-3 279.6 μs 277.0 μs -0.9%
currency-1 311.3 μs 312.4 μs +0.4%
escrow-redeem_1-1 438.8 μs 434.9 μs -0.9%
escrow-redeem_1-2 439.0 μs 436.4 μs -0.6%
escrow-redeem_2-1 509.8 μs 505.0 μs -0.9%
escrow-redeem_2-2 509.2 μs 503.3 μs -1.2%
escrow-redeem_2-3 509.8 μs 503.7 μs -1.2%
escrow-refund-1 206.7 μs 205.1 μs -0.8%
future-increase-margin-1 311.8 μs 313.3 μs +0.5%
future-increase-margin-2 664.4 μs 659.9 μs -0.7%
future-increase-margin-3 668.9 μs 665.2 μs -0.6%
future-increase-margin-4 604.4 μs 594.2 μs -1.7%
future-increase-margin-5 995.0 μs 982.3 μs -1.3%
future-pay-out-1 311.1 μs 311.0 μs -0.0%
future-pay-out-2 664.8 μs 659.5 μs -0.8%
future-pay-out-3 670.4 μs 659.4 μs -1.6%
future-pay-out-4 1.005 ms 993.6 μs -1.1%
future-settle-early-1 311.6 μs 308.2 μs -1.1%
future-settle-early-2 668.6 μs 658.9 μs -1.5%
future-settle-early-3 664.5 μs 660.5 μs -0.6%
future-settle-early-4 767.8 μs 743.2 μs -3.2%
game-sm-success_1-1 489.5 μs 479.5 μs -2.0%
game-sm-success_1-2 268.2 μs 265.9 μs -0.9%
game-sm-success_1-3 792.7 μs 779.5 μs -1.7%
game-sm-success_1-4 310.4 μs 308.7 μs -0.5%
game-sm-success_2-1 491.8 μs 480.3 μs -2.3%
game-sm-success_2-2 275.9 μs 265.5 μs -3.8%
game-sm-success_2-3 792.7 μs 769.0 μs -3.0%
game-sm-success_2-4 310.0 μs 309.5 μs -0.2%
game-sm-success_2-5 792.4 μs 771.7 μs -2.6%
game-sm-success_2-6 310.6 μs 309.8 μs -0.3%
multisig-sm-1 497.0 μs 493.0 μs -0.8%
multisig-sm-2 485.1 μs 480.4 μs -1.0%
multisig-sm-3 481.9 μs 485.6 μs +0.8%
multisig-sm-4 494.4 μs 488.9 μs -1.1%
multisig-sm-5 682.0 μs 673.2 μs -1.3%
multisig-sm-6 496.7 μs 490.2 μs -1.3%
multisig-sm-7 486.8 μs 481.2 μs -1.2%
multisig-sm-8 483.1 μs 483.4 μs +0.1%
multisig-sm-9 493.1 μs 487.5 μs -1.1%
multisig-sm-10 681.5 μs 681.2 μs -0.0%
ping-pong-1 414.0 μs 406.0 μs -1.9%
ping-pong-2 410.7 μs 408.9 μs -0.4%
ping-pong_2-1 256.2 μs 256.1 μs -0.0%
prism-1 226.1 μs 225.4 μs -0.3%
prism-2 519.9 μs 517.0 μs -0.6%
prism-3 466.5 μs 464.0 μs -0.5%
pubkey-1 190.4 μs 195.3 μs +2.6%
stablecoin_1-1 1.162 ms 1.124 ms -3.3%
stablecoin_1-2 259.7 μs 258.8 μs -0.3%
stablecoin_1-3 1.309 ms 1.291 ms -1.4%
stablecoin_1-4 278.5 μs 276.6 μs -0.7%
stablecoin_1-5 1.666 ms 1.650 ms -1.0%
stablecoin_1-6 342.3 μs 339.8 μs -0.7%
stablecoin_2-1 1.147 ms 1.120 ms -2.4%
stablecoin_2-2 259.6 μs 258.5 μs -0.4%
stablecoin_2-3 1.306 ms 1.290 ms -1.2%
stablecoin_2-4 278.3 μs 277.2 μs -0.4%
token-account-1 240.5 μs 239.6 μs -0.4%
token-account-2 424.7 μs 421.6 μs -0.7%
uniswap-1 495.6 μs 490.0 μs -1.1%
uniswap-2 281.9 μs 281.0 μs -0.3%
uniswap-3 2.146 ms 2.106 ms -1.9%
uniswap-4 442.0 μs 440.9 μs -0.2%
uniswap-5 1.433 ms 1.419 ms -1.0%
uniswap-6 419.3 μs 420.3 μs +0.2%
vesting-1 443.1 μs 436.9 μs -1.4%
efaadc5 40a378f Change
TOTAL 44.24 ms 43.70 ms -1.2%

@effectfully effectfully force-pushed the effectfully/evaluation/define-1-indexing-via-0-indexing branch from 40a378f to 22bb3a2 Compare November 26, 2024 01:26
Comment on lines 186 to 156
length Nil = 0
length (BHead sz _ tl) = sz + RAL.length tl
{-# INLINABLE indexZero #-}
{-# INLINE uncons #-}

length = go 0 where
go acc Nil = acc
go acc (BHead sz _ tl) = go (acc + sz) tl
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know if it's important to make this one fast, but why not while we're here. It's more readable too, in my opinion.

empty = Nil
{-# INLINABLE cons #-}
{-# INLINE empty #-}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We really want all of that to inline, no point is chickening out and saying INLINABLE.

@@ -878,7 +878,7 @@ enterComputeCek = computeCek
-- | Look up a variable name in the environment.
lookupVarName :: NamedDeBruijn -> CekValEnv uni fun ann -> CekM uni fun s (CekValue uni fun ann)
lookupVarName varName@(NamedDeBruijn _ varIx) varEnv =
Env.safeIndexOneCont
Env.contIndexOne
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This names better matches the other names in the module, should've gone with it originally.

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.

2 participants