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

[Builtin] Quit using 'SomeConstantOf' #4173

Conversation

effectfully
Copy link
Contributor

This drops all occurrences of SomeConstantOf from the definitions of builtins. Since we hardcode DefaultUni there anyway, we can just match on tags directly, which really should be at least somewhat more performant (if it's not, then I'm optimizing something that is not even close to being a bottleneck).

Not ready for review, just for benchmarking.

@effectfully
Copy link
Contributor Author

@kwxm could you please run the built-in lists benchmarks on this PR?

@effectfully effectfully changed the title [Builtins] Quit using 'SomeConstantOf' [Builtin] Quit using 'SomeConstantOf' Nov 1, 2021
@kwxm
Copy link
Contributor

kwxm commented Nov 1, 2021

@kwxm could you please run the built-in lists benchmarks on this PR?

Will do. Shea's currently trying to get the automatic benchmarking to work again, so that's occupying the machine a lot. I'll run the benchmarks when it's quieter.

@effectfully
Copy link
Contributor Author

Thank you!

@kwxm
Copy link
Contributor

kwxm commented Nov 1, 2021

As requested. Looks promising.

Script                              Old            New         Change
----------------------------------------------------------------------------------
sort/ghcSort/10                   125.6 μs	 107.4 μs     -14.5%
sort/ghcSort/20                   261.0 μs	 250.8 μs      -3.9%
sort/ghcSort/30                   406.0 μs	 393.4 μs      -3.1%
sort/ghcSort/40                   645.7 μs	 587.1 μs      -9.1%
sort/ghcSort/50                   741.6 μs	 724.5 μs      -2.3%
sort/ghcSort/60                   947.2 μs	 906.4 μs      -4.3%
sort/ghcSort/70                   2.153 ms	 1.189 ms     -44.8%
sort/ghcSort/80                   1.858 ms	 1.355 ms     -27.1%
sort/ghcSort/90                   1.503 ms	 1.493 ms      -0.7%
sort/ghcSort/100                  1.691 ms	 1.687 ms      -0.2%
sort/ghcSort/110                  1.873 ms	 1.853 ms      -1.1%
sort/ghcSort/120                  2.122 ms	 2.114 ms      -0.4%
sort/ghcSort/130                  2.623 ms	 2.591 ms      -1.2%
sort/ghcSort/140                  2.776 ms	 2.767 ms      -0.3%
sort/ghcSort/150                  2.988 ms	 2.960 ms      -0.9%
sort/ghcSort/160                  3.194 ms	 3.191 ms      -0.1%
sort/ghcSort/170                  3.391 ms	 3.361 ms      -0.9%
sort/ghcSort/180                  3.568 ms	 3.559 ms      -0.3%
sort/ghcSort/190                  3.815 ms	 3.776 ms      -1.0%
sort/ghcSort/200                  4.232 ms	 4.050 ms      -4.3%
sort/ghcSort/210                  4.311 ms	 4.228 ms      -1.9%
sort/ghcSort/220                  4.463 ms	 4.457 ms      -0.1%
sort/ghcSort/230                  4.806 ms	 4.781 ms      -0.5%
sort/ghcSort/240                  5.115 ms	 5.055 ms      -1.2%
sort/ghcSort/250                  5.352 ms	 5.336 ms      -0.3%
sort/ghcSort/260                  6.219 ms	 6.148 ms      -1.1%
sort/ghcSort/270                  6.798 ms	 6.319 ms      -7.0%
sort/ghcSort/280                  6.641 ms	 6.523 ms      -1.8%
sort/ghcSort/290                  6.993 ms	 6.752 ms      -3.4%
sort/ghcSort/300                  7.219 ms	 6.987 ms      -3.2%
sort/ghcSort/310                  7.618 ms	 7.230 ms      -5.1%
sort/ghcSort/320                  8.630 ms	 7.461 ms     -13.5%
sort/ghcSort/330                  8.002 ms	 7.675 ms      -4.1%
sort/ghcSort/340                  8.593 ms	 7.890 ms      -8.2%
sort/ghcSort/350                  8.260 ms	 8.064 ms      -2.4%
sort/ghcSort/360                  8.789 ms	 8.318 ms      -5.4%
sort/ghcSort/370                  9.974 ms	 8.528 ms     -14.5%
sort/ghcSort/380                  9.079 ms	 8.818 ms      -2.9%
sort/ghcSort/390                  9.284 ms	 9.126 ms      -1.7%
sort/ghcSort/400                  9.397 ms	 9.330 ms      -0.7%
sort/ghcSort/410                  9.534 ms	 9.424 ms      -1.2%
sort/ghcSort/420                  9.849 ms	 9.789 ms      -0.6%
sort/ghcSort/430                  10.03 ms	 9.927 ms      -1.0%
sort/ghcSort/440                  10.28 ms	 10.25 ms      -0.3%
sort/ghcSort/450                  10.87 ms	 10.84 ms      -0.3%
sort/ghcSort/460                  11.03 ms	 10.93 ms      -0.9%
sort/ghcSort/470                  11.17 ms	 11.21 ms      +0.4%
sort/ghcSort/480                  11.62 ms	 11.53 ms      -0.8%
sort/ghcSort/490                  11.85 ms	 11.82 ms      -0.3%
sort/ghcSort/500                  12.22 ms	 12.10 ms      -1.0%
sort/insertionSort/10             102.2 μs	 99.85 μs      -2.3%
sort/insertionSort/20             381.4 μs	 372.7 μs      -2.3%
sort/insertionSort/30             830.5 μs	 819.5 μs      -1.3%
sort/insertionSort/40             1.454 ms	 1.436 ms      -1.2%
sort/insertionSort/50             2.254 ms	 2.222 ms      -1.4%
sort/insertionSort/60             3.250 ms	 3.189 ms      -1.9%
sort/insertionSort/70             4.383 ms	 4.326 ms      -1.3%
sort/insertionSort/80             5.748 ms	 5.657 ms      -1.6%
sort/insertionSort/90             7.288 ms	 7.138 ms      -2.1%
sort/insertionSort/100            8.973 ms	 8.844 ms      -1.4%
sort/insertionSort/110            10.92 ms	 10.67 ms      -2.3%
sort/insertionSort/120            12.92 ms	 12.70 ms      -1.7%
sort/insertionSort/130            15.16 ms	 14.88 ms      -1.8%
sort/insertionSort/140            17.62 ms	 17.32 ms      -1.7%
sort/insertionSort/150            20.51 ms	 19.94 ms      -2.8%
sort/insertionSort/160            24.09 ms	 22.76 ms      -5.5%
sort/insertionSort/170            27.13 ms	 25.74 ms      -5.1%
sort/insertionSort/180            31.73 ms	 28.76 ms      -9.4%
sort/insertionSort/190            35.11 ms	 32.20 ms      -8.3%
sort/insertionSort/200            37.54 ms	 35.67 ms      -5.0%
sort/insertionSort/210            41.59 ms	 39.50 ms      -5.0%
sort/insertionSort/220            45.10 ms	 43.34 ms      -3.9%
sort/insertionSort/230            49.70 ms	 47.61 ms      -4.2%
sort/insertionSort/240            57.28 ms	 51.85 ms      -9.5%
sort/insertionSort/250            56.75 ms	 56.56 ms      -0.3%
sort/insertionSort/260            62.44 ms	 61.25 ms      -1.9%
sort/insertionSort/270            67.75 ms	 66.16 ms      -2.3%
sort/insertionSort/280            72.65 ms	 71.55 ms      -1.5%
sort/insertionSort/290            78.18 ms	 76.89 ms      -1.7%
sort/insertionSort/300            83.75 ms	 82.68 ms      -1.3%
sort/insertionSort/310            89.96 ms	 88.12 ms      -2.0%
sort/insertionSort/320            96.23 ms	 94.06 ms      -2.3%
sort/insertionSort/330            102.3 ms	 100.3 ms      -2.0%
sort/insertionSort/340            108.7 ms	 106.9 ms      -1.7%
sort/insertionSort/350            115.8 ms	 113.8 ms      -1.7%
sort/insertionSort/360            122.5 ms	 120.3 ms      -1.8%
sort/insertionSort/370            130.4 ms	 127.2 ms      -2.5%
sort/insertionSort/380            152.5 ms	 134.5 ms     -11.8%
sort/insertionSort/390            145.3 ms	 141.8 ms      -2.4%
sort/insertionSort/400            154.1 ms	 150.0 ms      -2.7%
sort/insertionSort/410            160.8 ms	 157.1 ms      -2.3%
sort/insertionSort/420            168.7 ms	 166.1 ms      -1.5%
sort/insertionSort/430            180.3 ms	 173.5 ms      -3.8%
sort/insertionSort/440            216.6 ms	 182.9 ms     -15.6%
sort/insertionSort/450            200.1 ms	 191.3 ms      -4.4%
sort/insertionSort/460            219.0 ms	 200.4 ms      -8.5%
sort/insertionSort/470            217.2 ms	 209.3 ms      -3.6%
sort/insertionSort/480            257.5 ms	 218.3 ms     -15.2%
sort/insertionSort/490            236.7 ms	 227.0 ms      -4.1%
sort/insertionSort/500            249.4 ms	 238.5 ms      -4.4%
sort/mergeSort/10                 641.0 μs	 584.3 μs      -8.8%
sort/mergeSort/20                 1.413 ms	 1.393 ms      -1.4%
sort/mergeSort/30                 2.373 ms	 2.295 ms      -3.3%
sort/mergeSort/40                 5.926 ms	 3.246 ms     -45.2%
sort/mergeSort/50                 4.439 ms	 4.239 ms      -4.5%
sort/mergeSort/60                 5.276 ms	 5.267 ms      -0.2%
sort/mergeSort/70                 6.358 ms	 6.346 ms      -0.2%
sort/mergeSort/80                 7.432 ms	 7.401 ms      -0.4%
sort/mergeSort/90                 8.564 ms	 8.537 ms      -0.3%
sort/mergeSort/100                9.739 ms	 9.690 ms      -0.5%
sort/mergeSort/110                10.82 ms	 10.78 ms      -0.4%
sort/mergeSort/120                12.07 ms	 12.01 ms      -0.5%
sort/mergeSort/130                13.29 ms	 13.23 ms      -0.5%
sort/mergeSort/140                14.42 ms	 14.36 ms      -0.4%
sort/mergeSort/150                15.55 ms	 15.50 ms      -0.3%
sort/mergeSort/160                16.92 ms	 16.83 ms      -0.5%
sort/mergeSort/170                18.06 ms	 17.96 ms      -0.6%
sort/mergeSort/180                19.38 ms	 19.28 ms      -0.5%
sort/mergeSort/190                20.78 ms	 20.70 ms      -0.4%
sort/mergeSort/200                21.92 ms	 21.82 ms      -0.5%
sort/mergeSort/210                23.30 ms	 23.09 ms      -0.9%
sort/mergeSort/220                24.48 ms	 24.39 ms      -0.4%
sort/mergeSort/230                25.88 ms	 25.86 ms      -0.1%
sort/mergeSort/240                27.14 ms	 27.01 ms      -0.5%
sort/mergeSort/250                30.08 ms	 28.46 ms      -5.4%
sort/mergeSort/260                30.59 ms	 29.79 ms      -2.6%
sort/mergeSort/270                32.01 ms	 30.96 ms      -3.3%
sort/mergeSort/280                36.09 ms	 32.30 ms     -10.5%
sort/mergeSort/290                35.60 ms	 33.67 ms      -5.4%
sort/mergeSort/300                43.04 ms	 35.09 ms     -18.5%
sort/mergeSort/310                37.45 ms	 36.37 ms      -2.9%
sort/mergeSort/320                39.33 ms	 38.04 ms      -3.3%
sort/mergeSort/330                43.75 ms	 39.12 ms     -10.6%
sort/mergeSort/340                41.13 ms	 40.51 ms      -1.5%
sort/mergeSort/350                44.34 ms	 42.10 ms      -5.1%
sort/mergeSort/360                87.31 ms	 43.45 ms     -50.2%
sort/mergeSort/370                41.49 ms	 45.06 ms      +8.6%
sort/mergeSort/380                46.74 ms	 46.47 ms      -0.6%
sort/mergeSort/390                48.35 ms	 47.88 ms      -1.0%
sort/mergeSort/400                49.36 ms	 49.02 ms      -0.7%
sort/mergeSort/410                51.02 ms	 50.73 ms      -0.6%
sort/mergeSort/420                52.78 ms	 52.30 ms      -0.9%
sort/mergeSort/430                53.95 ms	 53.64 ms      -0.6%
sort/mergeSort/440                55.30 ms	 54.90 ms      -0.7%
sort/mergeSort/450                56.83 ms	 56.40 ms      -0.8%
sort/mergeSort/460                58.16 ms	 57.77 ms      -0.7%
sort/mergeSort/470                59.95 ms	 59.43 ms      -0.9%
sort/mergeSort/480                63.65 ms	 61.04 ms      -4.1%
sort/mergeSort/490                63.28 ms	 62.75 ms      -0.8%
sort/mergeSort/500                64.10 ms	 64.16 ms      +0.1%
sort/quickSort/10                 230.5 μs	 226.6 μs      -1.7%
sort/quickSort/20                 906.5 μs	 887.2 μs      -2.1%
sort/quickSort/30                 1.996 ms	 1.978 ms      -0.9%
sort/quickSort/40                 3.523 ms	 3.472 ms      -1.4%
sort/quickSort/50                 5.467 ms	 5.414 ms      -1.0%
sort/quickSort/60                 7.870 ms	 7.759 ms      -1.4%
sort/quickSort/70                 10.65 ms	 10.52 ms      -1.2%
sort/quickSort/80                 13.93 ms	 13.79 ms      -1.0%
sort/quickSort/90                 17.36 ms	 17.20 ms      -0.9%
sort/quickSort/100                21.46 ms	 21.31 ms      -0.7%
sort/quickSort/110                25.94 ms	 25.67 ms      -1.0%
sort/quickSort/120                31.07 ms	 30.75 ms      -1.0%
sort/quickSort/130                36.45 ms	 35.79 ms      -1.8%
sort/quickSort/140                42.10 ms	 41.45 ms      -1.5%
sort/quickSort/150                48.33 ms	 48.07 ms      -0.5%
sort/quickSort/160                54.97 ms	 54.43 ms      -1.0%
sort/quickSort/170                61.99 ms	 61.62 ms      -0.6%
sort/quickSort/180                70.01 ms	 69.06 ms      -1.4%
sort/quickSort/190                77.97 ms	 76.91 ms      -1.4%
sort/quickSort/200                86.40 ms	 85.14 ms      -1.5%
sort/quickSort/210                95.12 ms	 94.26 ms      -0.9%
sort/quickSort/220                104.7 ms	 103.7 ms      -1.0%
sort/quickSort/230                114.7 ms	 113.4 ms      -1.1%
sort/quickSort/240                124.9 ms	 123.5 ms      -1.1%
sort/quickSort/250                135.8 ms	 133.6 ms      -1.6%
sort/quickSort/260                147.0 ms	 145.7 ms      -0.9%
sort/quickSort/270                158.2 ms	 157.0 ms      -0.8%
sort/quickSort/280                169.7 ms	 168.5 ms      -0.7%
sort/quickSort/290                182.3 ms	 180.4 ms      -1.0%
sort/quickSort/300                195.2 ms	 192.4 ms      -1.4%
sort/quickSort/310                208.9 ms	 207.0 ms      -0.9%
sort/quickSort/320                222.4 ms	 220.7 ms      -0.8%
sort/quickSort/330                237.1 ms	 233.1 ms      -1.7%
sort/quickSort/340                252.3 ms	 248.9 ms      -1.3%
sort/quickSort/350                266.0 ms	 264.4 ms      -0.6%
sort/quickSort/360                283.0 ms	 278.1 ms      -1.7%
sort/quickSort/370                298.1 ms	 295.4 ms      -0.9%
sort/quickSort/380                313.4 ms	 310.5 ms      -0.9%
sort/quickSort/390                330.6 ms	 326.5 ms      -1.2%
sort/quickSort/400                348.2 ms	 343.7 ms      -1.3%
sort/quickSort/410                363.5 ms	 361.5 ms      -0.6%
sort/quickSort/420                384.5 ms	 379.9 ms      -1.2%
sort/quickSort/430                403.2 ms	 398.8 ms      -1.1%
sort/quickSort/440                419.2 ms	 418.8 ms      -0.1%
sort/quickSort/450                440.8 ms	 435.1 ms      -1.3%
sort/quickSort/460                463.4 ms	 456.5 ms      -1.5%
sort/quickSort/470                481.6 ms	 478.9 ms      -0.6%
sort/quickSort/480                503.2 ms	 499.8 ms      -0.7%
sort/quickSort/490                527.0 ms	 521.8 ms      -1.0%
sort/quickSort/500                547.4 ms	 540.0 ms      -1.4%
sum/compiled-from-Haskell/sum-right-builtin/10    26.92 μs	 22.93 μs     -14.8%
sum/compiled-from-Haskell/sum-right-builtin/50    128.3 μs	 109.7 μs     -14.5%
sum/compiled-from-Haskell/sum-right-builtin/100    259.5 μs	 221.4 μs     -14.7%
sum/compiled-from-Haskell/sum-right-builtin/500    1.533 ms	 1.337 ms     -12.8%
sum/compiled-from-Haskell/sum-right-builtin/1000    3.145 ms	 2.754 ms     -12.4%
sum/compiled-from-Haskell/sum-right-builtin/5000    15.90 ms	 14.06 ms     -11.6%
sum/compiled-from-Haskell/sum-right-builtin/10000    32.09 ms	 28.53 ms     -11.1%
sum/compiled-from-Haskell/sum-right-Scott/10    14.62 μs	 14.91 μs      +2.0%
sum/compiled-from-Haskell/sum-right-Scott/50    70.47 μs	 71.28 μs      +1.1%
sum/compiled-from-Haskell/sum-right-Scott/100    144.7 μs	 146.6 μs      +1.3%
sum/compiled-from-Haskell/sum-right-Scott/500    999.0 μs	 1.002 ms      +0.3%
sum/compiled-from-Haskell/sum-right-Scott/1000    2.168 ms	 2.178 ms      +0.5%
sum/compiled-from-Haskell/sum-right-Scott/5000    12.06 ms	 11.95 ms      -0.9%
sum/compiled-from-Haskell/sum-right-Scott/10000    25.07 ms	 25.13 ms      +0.2%
sum/compiled-from-Haskell/sum-left-builtin/10    27.13 μs	 22.73 μs     -16.2%
sum/compiled-from-Haskell/sum-left-builtin/50    131.5 μs	 110.1 μs     -16.3%
sum/compiled-from-Haskell/sum-left-builtin/100    266.7 μs	 222.9 μs     -16.4%
sum/compiled-from-Haskell/sum-left-builtin/500    1.581 ms	 1.366 ms     -13.6%
sum/compiled-from-Haskell/sum-left-builtin/1000    3.240 ms	 2.835 ms     -12.5%
sum/compiled-from-Haskell/sum-left-builtin/5000    16.34 ms	 14.30 ms     -12.5%
sum/compiled-from-Haskell/sum-left-builtin/10000    32.98 ms	 29.04 ms     -11.9%
sum/compiled-from-Haskell/sum-left-Scott/10    14.90 μs	 14.67 μs      -1.5%
sum/compiled-from-Haskell/sum-left-Scott/50    71.03 μs	 71.07 μs      +0.1%
sum/compiled-from-Haskell/sum-left-Scott/100    145.7 μs	 145.9 μs      +0.1%
sum/compiled-from-Haskell/sum-left-Scott/500    1.003 ms	 1.001 ms      -0.2%
sum/compiled-from-Haskell/sum-left-Scott/1000    2.169 ms	 2.170 ms      +0.0%
sum/compiled-from-Haskell/sum-left-Scott/5000    11.78 ms	 11.78 ms       0.0%
sum/compiled-from-Haskell/sum-left-Scott/10000    24.16 ms	 24.18 ms      +0.1%
sum/hand-written-PLC/sum-right-builtin/10    25.35 μs	 21.84 μs     -13.8%
sum/hand-written-PLC/sum-right-builtin/50    119.6 μs	 103.8 μs     -13.2%
sum/hand-written-PLC/sum-right-builtin/100    240.1 μs	 208.1 μs     -13.3%
sum/hand-written-PLC/sum-right-builtin/500    1.333 ms	 1.152 ms     -13.6%
sum/hand-written-PLC/sum-right-builtin/1000    2.760 ms	 2.416 ms     -12.5%
sum/hand-written-PLC/sum-right-builtin/5000    13.76 ms	 12.21 ms     -11.3%
sum/hand-written-PLC/sum-right-builtin/10000    28.52 ms	 24.41 ms     -14.4%
sum/hand-written-PLC/sum-right-Scott/10    11.51 μs	 10.57 μs      -8.2%
sum/hand-written-PLC/sum-right-Scott/50    52.00 μs	 49.75 μs      -4.3%
sum/hand-written-PLC/sum-right-Scott/100    100.1 μs	 99.58 μs      -0.5%
sum/hand-written-PLC/sum-right-Scott/500    577.2 μs	 574.5 μs      -0.5%
sum/hand-written-PLC/sum-right-Scott/1000    1.366 ms	 1.367 ms      +0.1%
sum/hand-written-PLC/sum-right-Scott/5000    7.664 ms	 7.644 ms      -0.3%
sum/hand-written-PLC/sum-right-Scott/10000    17.04 ms	 15.99 ms      -6.2%
sum/hand-written-PLC/sum-left-builtin/10    27.35 μs	 22.95 μs     -16.1%
sum/hand-written-PLC/sum-left-builtin/50    126.4 μs	 108.3 μs     -14.3%
sum/hand-written-PLC/sum-left-builtin/100    248.3 μs	 213.3 μs     -14.1%
sum/hand-written-PLC/sum-left-builtin/500    1.218 ms	 1.045 ms     -14.2%
sum/hand-written-PLC/sum-left-builtin/1000    2.425 ms	 2.083 ms     -14.1%
sum/hand-written-PLC/sum-left-builtin/5000    11.99 ms	 10.31 ms     -14.0%
sum/hand-written-PLC/sum-left-builtin/10000    23.96 ms	 20.65 ms     -13.8%
sum/hand-written-PLC/sum-left-Scott/10    11.24 μs	 11.38 μs      +1.2%
sum/hand-written-PLC/sum-left-Scott/50    53.62 μs	 53.75 μs      +0.2%
sum/hand-written-PLC/sum-left-Scott/100    106.9 μs	 106.8 μs      -0.1%
sum/hand-written-PLC/sum-left-Scott/500    555.0 μs	 558.6 μs      +0.6%
sum/hand-written-PLC/sum-left-Scott/1000    1.168 ms	 1.170 ms      +0.2%
sum/hand-written-PLC/sum-left-Scott/5000    6.034 ms	 6.065 ms      +0.5%
sum/hand-written-PLC/sum-left-Scott/10000    12.31 ms	 12.29 ms      -0.2%

@kwxm
Copy link
Contributor

kwxm commented Nov 1, 2021

Hmmm. I ran the validation benchmarks just to see what happened and got this:

Script                              Old            New         Change
----------------------------------------------------------------------------------
auction_1-1                       488.7 μs	 422.8 μs     -13.5%
auction_1-2                       1.298 ms	 1.210 ms      -6.8%
auction_1-3                       1.310 ms	 1.215 ms      -7.3%
auction_1-4                       654.6 μs	 561.7 μs     -14.2%
auction_2-1                       492.0 μs	 424.9 μs     -13.6%
auction_2-2                       1.291 ms	 1.206 ms      -6.6%
auction_2-3                       1.624 ms	 1.516 ms      -6.7%
auction_2-4                       1.308 ms	 1.213 ms      -7.3%
auction_2-5                       652.5 μs	 559.8 μs     -14.2%
crowdfunding-success-1            586.3 μs	 501.0 μs     -14.5%
crowdfunding-success-2            585.8 μs	 501.0 μs     -14.5%
crowdfunding-success-3            585.2 μs	 500.5 μs     -14.5%
currency-1                        560.7 μs	 502.2 μs     -10.4%
escrow-redeem_1-1                 850.8 μs	 764.0 μs     -10.2%
escrow-redeem_1-2                 850.4 μs	 769.2 μs      -9.5%
escrow-redeem_2-1                 971.7 μs	 876.6 μs      -9.8%
escrow-redeem_2-2                 971.6 μs	 876.3 μs      -9.8%
escrow-redeem_2-3                 971.5 μs	 878.0 μs      -9.6%
escrow-refund-1                   436.8 μs	 371.2 μs     -15.0%
future-increase-margin-1          562.2 μs	 504.2 μs     -10.3%
future-increase-margin-2          1.203 ms	 1.104 ms      -8.2%
future-increase-margin-3          1.202 ms	 1.105 ms      -8.1%
future-increase-margin-4          1.079 ms	 1.002 ms      -7.1%
future-increase-margin-5          1.539 ms	 1.457 ms      -5.3%
future-pay-out-1                  559.5 μs	 503.4 μs     -10.0%
future-pay-out-2                  1.200 ms	 1.105 ms      -7.9%
future-pay-out-3                  1.199 ms	 1.106 ms      -7.8%
future-pay-out-4                  1.542 ms	 1.451 ms      -5.9%
future-settle-early-1             562.2 μs	 503.3 μs     -10.5%
future-settle-early-2             1.206 ms	 1.103 ms      -8.5%
future-settle-early-3             1.206 ms	 1.103 ms      -8.5%
future-settle-early-4             1.230 ms	 1.147 ms      -6.7%
game-sm-success_1-1               925.2 μs	 841.3 μs      -9.1%
game-sm-success_1-2               557.0 μs	 473.3 μs     -15.0%
game-sm-success_1-3               1.328 ms	 1.227 ms      -7.6%
game-sm-success_1-4               648.7 μs	 553.0 μs     -14.8%
game-sm-success_2-1               923.2 μs	 840.7 μs      -8.9%
game-sm-success_2-2               555.8 μs	 474.4 μs     -14.6%
game-sm-success_2-3               1.324 ms	 1.235 ms      -6.7%
game-sm-success_2-4               647.2 μs	 556.3 μs     -14.0%
game-sm-success_2-5               1.322 ms	 1.232 ms      -6.8%
game-sm-success_2-6               646.9 μs	 556.1 μs     -14.0%
multisig-sm-1                     913.9 μs	 844.6 μs      -7.6%
multisig-sm-2                     903.5 μs	 833.3 μs      -7.8%
multisig-sm-3                     912.2 μs	 839.3 μs      -8.0%
multisig-sm-4                     923.5 μs	 846.0 μs      -8.4%
multisig-sm-5                     1.168 ms	 1.088 ms      -6.8%
multisig-sm-6                     918.6 μs	 843.9 μs      -8.1%
multisig-sm-7                     906.7 μs	 830.5 μs      -8.4%
multisig-sm-8                     915.0 μs	 840.2 μs      -8.2%
multisig-sm-9                     924.8 μs	 846.2 μs      -8.5%
multisig-sm-10                    1.168 ms	 1.088 ms      -6.8%
ping-pong-1                       776.7 μs	 698.5 μs     -10.1%
ping-pong-2                       777.9 μs	 701.1 μs      -9.9%
ping-pong_2-1                     521.5 μs	 453.8 μs     -13.0%
prism-1                           461.9 μs	 395.9 μs     -14.3%
prism-2                           1.000 ms	 910.1 μs      -9.0%
prism-3                           876.6 μs	 785.1 μs     -10.4%
pubkey-1                          395.7 μs	 339.7 μs     -14.2%
stablecoin_1-1                    1.820 ms	 1.724 ms      -5.3%
stablecoin_1-2                    541.6 μs	 464.5 μs     -14.2%
stablecoin_1-3                    2.071 ms	 1.976 ms      -4.6%
stablecoin_1-4                    577.0 μs	 493.7 μs     -14.4%
stablecoin_1-5                    2.638 ms	 2.522 ms      -4.4%
stablecoin_1-6                    709.3 μs	 609.5 μs     -14.1%
stablecoin_2-1                    1.815 ms	 1.722 ms      -5.1%
stablecoin_2-2                    543.5 μs	 463.3 μs     -14.8%
stablecoin_2-3                    2.073 ms	 1.971 ms      -4.9%
stablecoin_2-4                    579.8 μs	 492.5 μs     -15.1%
token-account-1                   455.7 μs	 400.0 μs     -12.2%
token-account-2                   778.9 μs	 697.9 μs     -10.4%
uniswap-1                         838.7 μs	 776.0 μs      -7.5%
uniswap-2                         560.1 μs	 486.8 μs     -13.1%
uniswap-3                         3.327 ms	 3.163 ms      -4.9%
uniswap-4                         920.6 μs	 799.0 μs     -13.2%
uniswap-5                         2.447 ms	 2.299 ms      -6.0%
uniswap-6                         874.4 μs	 760.0 μs     -13.1%
vesting-1                         786.2 μs	 716.1 μs      -8.9%

I was under the impression that calling builtins only accounted for about 15% of validation time, but I'm going to have to think again. Some of the nofib benchmarks call builtins a lot, so I'll run them tomorrow and see what happens.

@kwxm
Copy link
Contributor

kwxm commented Nov 2, 2021

There's no apparent difference in the nofib examples: everything's pretty much within ±1%.

@kwxm
Copy link
Contributor

kwxm commented Nov 2, 2021

Actually that's not quite true. Some programs are consistently a little faster, some are consistently a little slower. The differences are very small though.

Script                              Old            New         Change
-------------------------------------------------------------------------------
clausify/formula1                 33.65 ms	 33.78 ms      +0.4%
clausify/formula2                 41.47 ms	 41.57 ms      +0.2%
clausify/formula3                 113.5 ms	 114.0 ms      +0.4%
clausify/formula4                 161.6 ms	 162.1 ms      +0.3%
clausify/formula5                 722.3 ms	 724.7 ms      +0.3%
knights/4x4                       107.1 ms	 107.4 ms      +0.3%
knights/6x6                       291.8 ms	 290.9 ms      -0.3%
knights/8x8                       484.7 ms	 482.2 ms      -0.5%
primetest/05digits                76.89 ms	 77.51 ms      +0.8%
primetest/08digits                143.1 ms	 143.7 ms      +0.4%
primetest/10digits                202.8 ms	 203.8 ms      +0.5%
primetest/20digits                402.0 ms	 404.0 ms      +0.5%
primetest/30digits                581.8 ms	 585.7 ms      +0.7%
primetest/40digits                778.4 ms	 783.7 ms      +0.7%
primetest/50digits                779.4 ms	 783.4 ms      +0.5%
queens4x4/bt                      16.23 ms	 16.12 ms      -0.7%
queens4x4/bm                      25.65 ms	 25.52 ms      -0.5%
queens4x4/bjbt1                   19.95 ms	 19.84 ms      -0.6%
queens4x4/bjbt2                   21.40 ms	 21.23 ms      -0.8%
queens4x4/fc                      53.03 ms	 52.42 ms      -1.2%
queens5x5/bt                      220.3 ms	 219.1 ms      -0.5%
queens5x5/bm                      302.1 ms	 300.4 ms      -0.6%
queens5x5/bjbt1                   257.7 ms	 256.2 ms      -0.6%
queens5x5/bjbt2                   272.5 ms	 270.8 ms      -0.6%
queens5x5/fc                      678.7 ms	 673.5 ms      -0.8%

@michaelpj
Copy link
Contributor

Huh, that's a really surprisingly large difference! I'm quite surprised...

@michaelpj
Copy link
Contributor

Certainly not going to complain, though.

Copy link
Contributor

@michaelpj michaelpj left a comment

Choose a reason for hiding this comment

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

Should we just get rid of SomeConstantOf, then?

@@ -658,6 +659,28 @@ instance (HasConstantIn uni term, KnownTypeAst uni rep) =>
makeKnown _ = pure . fromConstant . unSomeConstant
readKnown mayCause = fmap SomeConstant . asConstant mayCause

newtype SomeConstantPoly uni f reps = SomeConstantPoly
Copy link
Contributor

Choose a reason for hiding this comment

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

doc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not ready for review!

@effectfully
Copy link
Contributor Author

@kwxm

There's no apparent difference in the nofib examples: everything's pretty much within ±1%.

Yep, this should be the case as this PR only touches functions over polymorphic built-in types and I guess we have none in nofib?

Some programs are consistently a little faster, some are consistently a little slower.

Hm, weird then.

@michaelpj

Should we just get rid of SomeConstantOf, then?

I was thinking about moving it to the Debug module, 'cause it's a much safer way of defining builtins, it almost forces you to write the right thing. And I'm gonna introduce some safety to SomeConstant and it would be nice not to have both SomeConstant and SomeConstantPoly, so I'm gonna experiment with this stuff over the weekend to see if there's more room for improvement.

I guess this PR can be merged as is though, once I write some docs and move SomeConstantOf to Debug.

@michaelpj
Copy link
Contributor

Yep, this should be the case as this PR only touches functions over polymorphic built-in types and I guess we have none in nofib?

Aha, that makes me guess what this is: it's probably speeding up all the decoding of data!

@michaelpj
Copy link
Contributor

I guess this PR can be merged as is though, once I write some docs and move SomeConstantOf to Debug.

I think we should definitely merge it, given the speedup, happy to wait until you make it nicer as you like.

@kwxm
Copy link
Contributor

kwxm commented Nov 2, 2021

I ran the validation benchmarks again with a freshly-pulled master to make sure that I hadn't done anything silly. SImilar results.

Script                              Old            New         Change
----------------------------------------------------------------------------------
auction_1-1                       533.5 μs	 476.6 μs     -10.7%
auction_1-2                       1.364 ms	 1.276 ms      -6.5%
auction_1-3                       1.380 ms	 1.287 ms      -6.7%
auction_1-4                       713.8 μs	 641.5 μs     -10.1%
auction_2-1                       538.0 μs	 480.9 μs     -10.6%
auction_2-2                       1.362 ms	 1.276 ms      -6.3%
auction_2-3                       1.704 ms	 1.598 ms      -6.2%
auction_2-4                       1.377 ms	 1.285 ms      -6.7%
auction_2-5                       711.7 μs	 640.3 μs     -10.0%
crowdfunding-success-1            639.1 μs	 570.4 μs     -10.7%
crowdfunding-success-2            639.9 μs	 570.2 μs     -10.9%
crowdfunding-success-3            637.6 μs	 568.4 μs     -10.9%
currency-1                        598.8 μs	 546.0 μs      -8.8%
escrow-redeem_1-1                 904.4 μs	 832.6 μs      -7.9%
escrow-redeem_1-2                 905.5 μs	 833.8 μs      -7.9%
escrow-redeem_2-1                 1.032 ms	 952.7 μs      -7.7%
escrow-redeem_2-2                 1.034 ms	 952.9 μs      -7.8%
escrow-redeem_2-3                 1.035 ms	 955.1 μs      -7.7%
escrow-refund-1                   473.3 μs	 425.3 μs     -10.1%
future-increase-margin-1          600.6 μs	 548.8 μs      -8.6%
future-increase-margin-2          1.284 ms	 1.185 ms      -7.7%
future-increase-margin-3          1.284 ms	 1.183 ms      -7.9%
future-increase-margin-4          1.138 ms	 1.062 ms      -6.7%
future-increase-margin-5          1.620 ms	 1.521 ms      -6.1%
future-pay-out-1                  598.3 μs	 547.0 μs      -8.6%
future-pay-out-2                  1.279 ms	 1.183 ms      -7.5%
future-pay-out-3                  1.281 ms	 1.184 ms      -7.6%
future-pay-out-4                  1.616 ms	 1.515 ms      -6.3%
future-settle-early-1             596.8 μs	 547.1 μs      -8.3%
future-settle-early-2             1.277 ms	 1.180 ms      -7.6%
future-settle-early-3             1.277 ms	 1.186 ms      -7.1%
future-settle-early-4             1.290 ms	 1.216 ms      -5.7%
game-sm-success_1-1               977.3 μs	 908.7 μs      -7.0%
game-sm-success_1-2               604.1 μs	 543.4 μs     -10.0%
game-sm-success_1-3               1.398 ms	 1.310 ms      -6.3%
game-sm-success_1-4               706.8 μs	 633.6 μs     -10.4%
game-sm-success_2-1               981.5 μs	 907.1 μs      -7.6%
game-sm-success_2-2               606.2 μs	 542.7 μs     -10.5%
game-sm-success_2-3               1.398 ms	 1.305 ms      -6.7%
game-sm-success_2-4               707.0 μs	 634.1 μs     -10.3%
game-sm-success_2-5               1.401 ms	 1.305 ms      -6.9%
game-sm-success_2-6               706.1 μs	 632.8 μs     -10.4%
multisig-sm-1                     968.8 μs	 899.0 μs      -7.2%
multisig-sm-2                     956.1 μs	 887.7 μs      -7.2%
multisig-sm-3                     962.4 μs	 894.9 μs      -7.0%
multisig-sm-4                     973.4 μs	 902.7 μs      -7.3%
multisig-sm-5                     1.228 ms	 1.147 ms      -6.6%
multisig-sm-6                     967.6 μs	 897.7 μs      -7.2%
multisig-sm-7                     953.3 μs	 890.6 μs      -6.6%
multisig-sm-8                     964.0 μs	 899.4 μs      -6.7%
multisig-sm-9                     972.7 μs	 909.3 μs      -6.5%
multisig-sm-10                    1.231 ms	 1.153 ms      -6.3%
ping-pong-1                       824.9 μs	 765.8 μs      -7.2%
ping-pong-2                       825.1 μs	 765.4 μs      -7.2%
ping-pong_2-1                     561.4 μs	 509.4 μs      -9.3%
prism-1                           505.5 μs	 449.9 μs     -11.0%
prism-2                           1.063 ms	 982.3 μs      -7.6%
prism-3                           940.3 μs	 857.4 μs      -8.8%
pubkey-1                          434.0 μs	 386.3 μs     -11.0%
stablecoin_1-1                    1.922 ms	 1.783 ms      -7.2%
stablecoin_1-2                    592.8 μs	 528.9 μs     -10.8%
stablecoin_1-3                    2.180 ms	 2.019 ms      -7.4%
stablecoin_1-4                    630.1 μs	 561.8 μs     -10.8%
stablecoin_1-5                    2.784 ms	 2.564 ms      -7.9%
stablecoin_1-6                    772.8 μs	 697.1 μs      -9.8%
stablecoin_2-1                    1.915 ms	 1.788 ms      -6.6%
stablecoin_2-2                    592.2 μs	 531.4 μs     -10.3%
stablecoin_2-3                    2.174 ms	 2.030 ms      -6.6%
stablecoin_2-4                    628.0 μs	 564.3 μs     -10.1%
token-account-1                   488.0 μs	 441.6 μs      -9.5%
token-account-2                   831.5 μs	 762.1 μs      -8.3%
uniswap-1                         884.0 μs	 821.1 μs      -7.1%
uniswap-2                         605.1 μs	 545.9 μs      -9.8%
uniswap-3                         3.501 ms	 3.222 ms      -8.0%
uniswap-4                         1.004 ms	 902.1 μs     -10.1%
uniswap-5                         2.581 ms	 2.374 ms      -8.0%
uniswap-6                         950.4 μs	 853.6 μs     -10.2%
vesting-1                         831.0 μs	 769.9 μs      -7.4%

@kwxm
Copy link
Contributor

kwxm commented Nov 2, 2021

But wait! Everything's slower today. Here's what happens if I compare the results for yesterday and today.

Script                          master, 1 Nov  master, 2 Nov   Change
----------------------------------------------------------------------------------
auction_1-1                       488.7 μs	 533.5 μs      +9.2%
auction_1-2                       1.298 ms	 1.364 ms      +5.1%
auction_1-3                       1.310 ms	 1.380 ms      +5.3%
auction_1-4                       654.6 μs	 713.8 μs      +9.0%
auction_2-1                       492.0 μs	 538.0 μs      +9.3%
auction_2-2                       1.291 ms	 1.362 ms      +5.5%
auction_2-3                       1.624 ms	 1.704 ms      +4.9%
auction_2-4                       1.308 ms	 1.377 ms      +5.3%
auction_2-5                       652.5 μs	 711.7 μs      +9.1%
crowdfunding-success-1            586.3 μs	 639.1 μs      +9.0%
crowdfunding-success-2            585.8 μs	 639.9 μs      +9.2%
crowdfunding-success-3            585.2 μs	 637.6 μs      +9.0%
currency-1                        560.7 μs	 598.8 μs      +6.8%
escrow-redeem_1-1                 850.8 μs	 904.4 μs      +6.3%
escrow-redeem_1-2                 850.4 μs	 905.5 μs      +6.5%
escrow-redeem_2-1                 971.7 μs	 1.032 ms      +6.2%
escrow-redeem_2-2                 971.6 μs	 1.034 ms      +6.4%
escrow-redeem_2-3                 971.5 μs	 1.035 ms      +6.5%
escrow-refund-1                   436.8 μs	 473.3 μs      +8.4%
future-increase-margin-1          562.2 μs	 600.6 μs      +6.8%
future-increase-margin-2          1.203 ms	 1.284 ms      +6.7%
future-increase-margin-3          1.202 ms	 1.284 ms      +6.8%
future-increase-margin-4          1.079 ms	 1.138 ms      +5.5%
future-increase-margin-5          1.539 ms	 1.620 ms      +5.3%
future-pay-out-1                  559.5 μs	 598.3 μs      +6.9%
future-pay-out-2                  1.200 ms	 1.279 ms      +6.6%
future-pay-out-3                  1.199 ms	 1.281 ms      +6.8%
future-pay-out-4                  1.542 ms	 1.616 ms      +4.8%
future-settle-early-1             562.2 μs	 596.8 μs      +6.2%
future-settle-early-2             1.206 ms	 1.277 ms      +5.9%
future-settle-early-3             1.206 ms	 1.277 ms      +5.9%
future-settle-early-4             1.230 ms	 1.290 ms      +4.9%
game-sm-success_1-1               925.2 μs	 977.3 μs      +5.6%
game-sm-success_1-2               557.0 μs	 604.1 μs      +8.5%
game-sm-success_1-3               1.328 ms	 1.398 ms      +5.3%
game-sm-success_1-4               648.7 μs	 706.8 μs      +9.0%
game-sm-success_2-1               923.2 μs	 981.5 μs      +6.3%
game-sm-success_2-2               555.8 μs	 606.2 μs      +9.1%
game-sm-success_2-3               1.324 ms	 1.398 ms      +5.6%
game-sm-success_2-4               647.2 μs	 707.0 μs      +9.2%
game-sm-success_2-5               1.322 ms	 1.401 ms      +6.0%
game-sm-success_2-6               646.9 μs	 706.1 μs      +9.2%
multisig-sm-1                     913.9 μs	 968.8 μs      +6.0%
multisig-sm-2                     903.5 μs	 956.1 μs      +5.8%
multisig-sm-3                     912.2 μs	 962.4 μs      +5.5%
multisig-sm-4                     923.5 μs	 973.4 μs      +5.4%
multisig-sm-5                     1.168 ms	 1.228 ms      +5.1%
multisig-sm-6                     918.6 μs	 967.6 μs      +5.3%
multisig-sm-7                     906.7 μs	 953.3 μs      +5.1%
multisig-sm-8                     915.0 μs	 964.0 μs      +5.4%
multisig-sm-9                     924.8 μs	 972.7 μs      +5.2%
multisig-sm-10                    1.168 ms	 1.231 ms      +5.4%
ping-pong-1                       776.7 μs	 824.9 μs      +6.2%
ping-pong-2                       777.9 μs	 825.1 μs      +6.1%
ping-pong_2-1                     521.5 μs	 561.4 μs      +7.7%
prism-1                           461.9 μs	 505.5 μs      +9.4%
prism-2                           1.000 ms	 1.063 ms      +6.3%
prism-3                           876.6 μs	 940.3 μs      +7.3%
pubkey-1                          395.7 μs	 434.0 μs      +9.7%
stablecoin_1-1                    1.820 ms	 1.922 ms      +5.6%
stablecoin_1-2                    541.6 μs	 592.8 μs      +9.5%
stablecoin_1-3                    2.071 ms	 2.180 ms      +5.3%
stablecoin_1-4                    577.0 μs	 630.1 μs      +9.2%
stablecoin_1-5                    2.638 ms	 2.784 ms      +5.5%
stablecoin_1-6                    709.3 μs	 772.8 μs      +9.0%
stablecoin_2-1                    1.815 ms	 1.915 ms      +5.5%
stablecoin_2-2                    543.5 μs	 592.2 μs      +9.0%
stablecoin_2-3                    2.073 ms	 2.174 ms      +4.9%
stablecoin_2-4                    579.8 μs	 628.0 μs      +8.3%
token-account-1                   455.7 μs	 488.0 μs      +7.1%
token-account-2                   778.9 μs	 831.5 μs      +6.8%
uniswap-1                         838.7 μs	 884.0 μs      +5.4%
uniswap-2                         560.1 μs	 605.1 μs      +8.0%
uniswap-3                         3.327 ms	 3.501 ms      +5.2%
uniswap-4                         920.6 μs	 1.004 ms      +9.1%
uniswap-5                         2.447 ms	 2.581 ms      +5.5%
uniswap-6                         874.4 μs	 950.4 μs      +8.7%
vesting-1                         786.2 μs	 831.0 μs      +5.7%
Script                         Roman, 1 Nov   Roman, 2 Nov    Change
----------------------------------------------------------------------------------
auction_1-1                       422.8 μs	 476.6 μs     +12.7%
auction_1-2                       1.210 ms	 1.276 ms      +5.5%
auction_1-3                       1.215 ms	 1.287 ms      +5.9%
auction_1-4                       561.7 μs	 641.5 μs     +14.2%
auction_2-1                       424.9 μs	 480.9 μs     +13.2%
auction_2-2                       1.206 ms	 1.276 ms      +5.8%
auction_2-3                       1.516 ms	 1.598 ms      +5.4%
auction_2-4                       1.213 ms	 1.285 ms      +5.9%
auction_2-5                       559.8 μs	 640.3 μs     +14.4%
crowdfunding-success-1            501.0 μs	 570.4 μs     +13.9%
crowdfunding-success-2            501.0 μs	 570.2 μs     +13.8%
crowdfunding-success-3            500.5 μs	 568.4 μs     +13.6%
currency-1                        502.2 μs	 546.0 μs      +8.7%
escrow-redeem_1-1                 764.0 μs	 832.6 μs      +9.0%
escrow-redeem_1-2                 769.2 μs	 833.8 μs      +8.4%
escrow-redeem_2-1                 876.6 μs	 952.7 μs      +8.7%
escrow-redeem_2-2                 876.3 μs	 952.9 μs      +8.7%
escrow-redeem_2-3                 878.0 μs	 955.1 μs      +8.8%
escrow-refund-1                   371.2 μs	 425.3 μs     +14.6%
future-increase-margin-1          504.2 μs	 548.8 μs      +8.8%
future-increase-margin-2          1.104 ms	 1.185 ms      +7.3%
future-increase-margin-3          1.105 ms	 1.183 ms      +7.1%
future-increase-margin-4          1.002 ms	 1.062 ms      +6.0%
future-increase-margin-5          1.457 ms	 1.521 ms      +4.4%
future-pay-out-1                  503.4 μs	 547.0 μs      +8.7%
future-pay-out-2                  1.105 ms	 1.183 ms      +7.1%
future-pay-out-3                  1.106 ms	 1.184 ms      +7.1%
future-pay-out-4                  1.451 ms	 1.515 ms      +4.4%
future-settle-early-1             503.3 μs	 547.1 μs      +8.7%
future-settle-early-2             1.103 ms	 1.180 ms      +7.0%
future-settle-early-3             1.103 ms	 1.186 ms      +7.5%
future-settle-early-4             1.147 ms	 1.216 ms      +6.0%
game-sm-success_1-1               841.3 μs	 908.7 μs      +8.0%
game-sm-success_1-2               473.3 μs	 543.4 μs     +14.8%
game-sm-success_1-3               1.227 ms	 1.310 ms      +6.8%
game-sm-success_1-4               553.0 μs	 633.6 μs     +14.6%
game-sm-success_2-1               840.7 μs	 907.1 μs      +7.9%
game-sm-success_2-2               474.4 μs	 542.7 μs     +14.4%
game-sm-success_2-3               1.235 ms	 1.305 ms      +5.7%
game-sm-success_2-4               556.3 μs	 634.1 μs     +14.0%
game-sm-success_2-5               1.232 ms	 1.305 ms      +5.9%
game-sm-success_2-6               556.1 μs	 632.8 μs     +13.8%
multisig-sm-1                     844.6 μs	 899.0 μs      +6.4%
multisig-sm-2                     833.3 μs	 887.7 μs      +6.5%
multisig-sm-3                     839.3 μs	 894.9 μs      +6.6%
multisig-sm-4                     846.0 μs	 902.7 μs      +6.7%
multisig-sm-5                     1.088 ms	 1.147 ms      +5.4%
multisig-sm-6                     843.9 μs	 897.7 μs      +6.4%
multisig-sm-7                     830.5 μs	 890.6 μs      +7.2%
multisig-sm-8                     840.2 μs	 899.4 μs      +7.0%
multisig-sm-9                     846.2 μs	 909.3 μs      +7.5%
multisig-sm-10                    1.088 ms	 1.153 ms      +6.0%
ping-pong-1                       698.5 μs	 765.8 μs      +9.6%
ping-pong-2                       701.1 μs	 765.4 μs      +9.2%
ping-pong_2-1                     453.8 μs	 509.4 μs     +12.3%
prism-1                           395.9 μs	 449.9 μs     +13.6%
prism-2                           910.1 μs	 982.3 μs      +7.9%
prism-3                           785.1 μs	 857.4 μs      +9.2%
pubkey-1                          339.7 μs	 386.3 μs     +13.7%
stablecoin_1-1                    1.724 ms	 1.783 ms      +3.4%
stablecoin_1-2                    464.5 μs	 528.9 μs     +13.9%
stablecoin_1-3                    1.976 ms	 2.019 ms      +2.2%
stablecoin_1-4                    493.7 μs	 561.8 μs     +13.8%
stablecoin_1-5                    2.522 ms	 2.564 ms      +1.7%
stablecoin_1-6                    609.5 μs	 697.1 μs     +14.4%
stablecoin_2-1                    1.722 ms	 1.788 ms      +3.8%
stablecoin_2-2                    463.3 μs	 531.4 μs     +14.7%
stablecoin_2-3                    1.971 ms	 2.030 ms      +3.0%
stablecoin_2-4                    492.5 μs	 564.3 μs     +14.6%
token-account-1                   400.0 μs	 441.6 μs     +10.4%
token-account-2                   697.9 μs	 762.1 μs      +9.2%
uniswap-1                         776.0 μs	 821.1 μs      +5.8%
uniswap-2                         486.8 μs	 545.9 μs     +12.1%
uniswap-3                         3.163 ms	 3.222 ms      +1.9%
uniswap-4                         799.0 μs	 902.1 μs     +12.9%
uniswap-5                         2.299 ms	 2.374 ms      +3.3%
uniswap-6                         760.0 μs	 853.6 μs     +12.3%
vesting-1                         716.1 μs	 769.9 μs      +7.5%

I have no idea what's going on. According to top there's nothing else running that isn't usually there.

@michaelpj
Copy link
Contributor

Well, as long as the diff from with and without this PR is the same today as yesterday, I'm not too bothered.

@effectfully effectfully force-pushed the effectfully/builtins/ignore-SomeConstantOf branch from 86df0b2 to 9452629 Compare November 7, 2021 09:54
@effectfully effectfully marked this pull request as ready for review November 7, 2021 12:16
@effectfully
Copy link
Contributor Author

Ok, I've moved a few definitions around, added a bit of docs and didn't touch anything else, so given @michaelpj's approval, I'm gonna merge this. I'll try unifying SomeConstant and SomeConstantPoly separately.

@effectfully effectfully merged commit 4d047ba into IntersectMBO:master Nov 7, 2021
@effectfully effectfully deleted the effectfully/builtins/ignore-SomeConstantOf branch November 7, 2021 12:19
MaximilianAlgehed pushed a commit to Quviq/plutus that referenced this pull request Mar 3, 2022
It was pointless and inefficient when there's no universe polymorphic. Now we have `SomeConstantPoly`, which serves the same purpose, but is faster, even though it's not as safe.
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