Skip to content

cbn: use delayed substitution#22035

Open
Janno wants to merge 1 commit into
rocq-prover:masterfrom
Janno:janno/cbn-delayed-subst
Open

cbn: use delayed substitution#22035
Janno wants to merge 1 commit into
rocq-prover:masterfrom
Janno:janno/cbn-delayed-subst

Conversation

@Janno

@Janno Janno commented May 19, 2026

Copy link
Copy Markdown
Contributor

The code in tactics/cbn.ml was written exclusively by GPT-5.5. It was prompted to implement delayed substitution and then to optimize the performance of examples collected from bugs, from #19309, and from bench regressions that appeared in earlier iterations.

The changes fix several catastrophic examples of cbn slowness and generally improve its performance but they are not strictly an improvement over master. There are examples in the bench and in some of the added test cases on which the new code is a bit slower.

SkyLabs code (which uses cbn almost exclusively but doesn't have (m)any catastrophic examples left) shows a 0.35% speedup as of 50eba77

TODO:

  • Collect all open performance issues for cbn and figure out which ones would be closed by the change.
  • The test suite has lots of Instructions and outdated instruction counts in comments, as well as some duplicate tests. I will sort through the tests to keep only those that document cbn behavior and, if possible, some Timeout tests to prevent regressions on catastrophic examples.

Fixes / closes #????

  • Added / updated test-suite.
  • Added changelog.
  • Added / updated documentation.
    • Documented any new / changed user messages.
    • Updated documented syntax by running make doc_gram_rsts.
  • Opened overlay pull requests.

@coqbot-app coqbot-app Bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label May 19, 2026
@Janno

Janno commented May 19, 2026

Copy link
Copy Markdown
Contributor Author

@coqbot bench

@Janno

Janno commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

I guess this bench job also got lost. Let's try again.

@coqbot bench

@coqbot-app

coqbot-app Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🏁 Bench results:

┌─────────────────────────────────────┬─────────────────────────┬───────────────────────────────────────┬─────────────────────────┐
│                                     │      user time [s]      │           CPU instructions            │  max resident mem [KB]  │
│                                     │                         │                                       │                         │
│            package_name             │   NEW      OLD    PDIFF │      NEW             OLD        PDIFF │   NEW      OLD    PDIFF │
├─────────────────────────────────────┼─────────────────────────┼───────────────────────────────────────┼─────────────────────────┤
│                         coq-unimath │ 1813.89  1834.44  -1.12 │ 14954554680378  15264873525706  -2.03 │ 1110568  1096052   1.32 │
│                           rocq-core │    6.79     6.86  -1.02 │    41658944793     41662847757  -0.01 │  442588   444768  -0.49 │
│         coq-rewriter-perf-SuperFast │  471.80   475.57  -0.79 │  3681920532465   3714990558934  -0.89 │ 1242416  1241432   0.08 │
│                        coq-bedrock2 │  359.54   362.15  -0.72 │  2978503713582   2991724432346  -0.44 │  835640   832268   0.41 │
│                        rocq-runtime │   75.54    76.07  -0.70 │   551387384218    550725680861   0.12 │  494544   494944  -0.08 │
│                        coq-coqprime │   53.19    53.28  -0.17 │   362235789124    362469143303  -0.06 │  822092   823992  -0.23 │
│          rocq-mathcomp-finite-group │   26.79    26.83  -0.15 │   173274956407    173273677470   0.00 │  578020   574536   0.61 │
│                      coq-coquelicot │   39.30    39.28   0.05 │   236943464789    237003123032  -0.03 │  830832   827448   0.41 │
│                      coq-verdi-raft │  496.09   495.74   0.07 │  3426936169636   3427740814409  -0.02 │  815216   814288   0.11 │
│                    coq-math-classes │   82.87    82.79   0.10 │   503129396452    503143632936  -0.00 │  515068   514744   0.06 │
│                        rocq-bignums │   25.35    25.32   0.12 │   160192186494    160218512851  -0.02 │  460220   458752   0.32 │
│               rocq-mathcomp-algebra │  332.07   331.63   0.13 │  2435956246770   2436026552802  -0.00 │ 1345244  1345820  -0.04 │
│                           coq-color │  231.79   231.47   0.14 │  1465805660560   1466977236531  -0.08 │ 1164120  1164044   0.01 │
│                 rocq-mathcomp-field │  194.71   194.41   0.15 │  1454145883025   1454171357050  -0.00 │ 2304764  2303588   0.05 │
│                       coq-fourcolor │ 1356.72  1354.58   0.16 │ 12448480300265  12449095992758  -0.00 │ 1017864  1021404  -0.35 │
│          coq-performance-tests-lite │  901.73   900.28   0.16 │  7190967394932   7226108385748  -0.49 │ 1271292  1242556   2.31 │
│                           rocq-elpi │   16.32    16.29   0.18 │   116596705818    116568717127   0.02 │  448648   448928  -0.06 │
│              rocq-mathcomp-solvable │  100.01    99.73   0.28 │   674135627982    674136643391  -0.00 │ 1123652  1123592   0.01 │
│                  rocq-mathcomp-boot │   39.70    39.57   0.33 │   233153717341    233156483631  -0.00 │  659792   660084  -0.04 │
│                           coq-verdi │   43.73    43.53   0.46 │   289543362369    289710283392  -0.06 │  526688   527980  -0.24 │
│               coq-engine-bench-lite │  129.38   128.78   0.47 │   960353777110    958722611929   0.17 │ 1108260  1106324   0.17 │
│                         rocq-stdlib │  440.32   438.00   0.53 │  1555473282484   1556124064110  -0.04 │  630072   632256  -0.35 │
│        coq-fiat-crypto-with-bedrock │ 7344.30  7305.58   0.53 │ 59921867300967  60197241871135  -0.46 │ 3003036  2971184   1.07 │
│               coq-mathcomp-analysis │ 1161.38  1155.25   0.53 │  8424321647982   8425928861792  -0.02 │ 1965712  1965716  -0.00 │
│                    coq-fiat-parsers │  278.27   276.53   0.63 │  2120480725399   2122037075989  -0.07 │ 2272404  2268016   0.19 │
│ coq-neural-net-interp-computed-lite │  240.56   238.89   0.70 │  2265692669779   2266081006656  -0.02 │  880612   880904  -0.03 │
│  rocq-mathcomp-group-representation │  104.64   103.89   0.72 │   731370077938    731452220854  -0.01 │ 1713552  1717300  -0.22 │
│                         coq-coqutil │   47.43    47.06   0.79 │   291922471385    292425693999  -0.17 │  563572   563716  -0.03 │
│                       coq-fiat-core │   55.87    55.43   0.79 │   336218002996    336943489146  -0.22 │  483040   480436   0.54 │
│             rocq-mathcomp-ssreflect │    1.11     1.10   0.91 │     7131449352      7133608930  -0.03 │  593576   593556   0.00 │
│              coq-mathcomp-odd-order │  611.27   605.34   0.98 │  4311225486586   4311355375077  -0.00 │ 2639860  2643700  -0.15 │
│                 rocq-mathcomp-order │   81.89    81.06   1.02 │   599946339392    599869199220   0.01 │ 1602980  1601040   0.12 │
│                        coq-rewriter │  335.18   331.75   1.03 │  2465500727876   2471591061744  -0.25 │ 1423756  1468900  -3.07 │
│                            coq-hott │  160.86   159.18   1.06 │  1079372774578   1074804187935   0.43 │  460548   466624  -1.30 │
│                   coq-iris-examples │  369.29   364.86   1.21 │  2394212634679   2393883744824   0.01 │ 1077724  1085944  -0.76 │
│                            coq-core │    2.73     2.69   1.49 │    18576286451     18565941091   0.06 │   90608    90568   0.04 │
│                            coq-corn │  670.26   658.79   1.74 │  4454348753154   4454302730038   0.00 │  768668   768816  -0.02 │
└─────────────────────────────────────┴─────────────────────────┴───────────────────────────────────────┴─────────────────────────┘

INFO: failed to install
coq-compcert (dependency install failed in NEW)
rocq-equations (in NEW)

rocq-metarocq-utils (dependency rocq-equations failed)
rocq-metarocq-common (dependency rocq-equations failed)
rocq-metarocq-template (dependency rocq-equations failed)
rocq-metarocq-pcuic (dependency rocq-equations failed)
rocq-metarocq-safechecker (dependency rocq-equations failed)
rocq-metarocq-erasure (dependency rocq-equations failed)
rocq-metarocq-translations (dependency rocq-equations failed)
coq-vst (dependency coq-compcert failed)
coq-category-theory (dependency rocq-equations failed)

🐢 Top 25 slow downs
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                         TOP 25 SLOW DOWNS                                                          │
│                                                                                                                                    │
│ OLD   NEW    DIFF   %DIFF    Ln                     FILE                                                                           │
├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 51.1  54.9  3.7564   7.35%   567  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│ 59.4  62.8  3.3994   5.72%   659  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│ 56.0  59.3  3.2906   5.88%   512  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│ 41.2  44.1  2.9665   7.21%   539  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│ 43.7  46.4  2.7597   6.32%   256  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Jacobian.v.html                                    │
│ 54.6  56.8  2.1751   3.98%   296  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/Addchain.v.html                               │
│ 7.84  9.67  1.8298  23.33%  1831  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvFunctions.v.html │
│  203   205  1.8162   0.89%     8  coq-neural-net-interp-computed-lite/theories/MaxOfTwoNumbersSimpler/Computed/AllLogits.v.html    │
│ 42.2  44.0  1.7457   4.13%   578  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/MMIO.v.html                 │
│ 31.0  32.7  1.7114   5.53%   596  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│ 38.5  39.8  1.2972   3.37%  1423  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvFunctions.v.html │
│ 21.6  22.7  1.1335   5.25%   616  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│ 44.1  45.1  1.0434   2.37%     3  coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/WithBedrock/fiat_crypto.v.html              │
│ 21.2  22.2  1.0377   4.90%    49  coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html                          │
│ 9.11  10.0  0.8983   9.86%   435  coq-mathcomp-odd-order/theories/PFsection12.v.html                                               │
│ 44.0  44.9  0.8341   1.89%     3  coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/bedrock2_fiat_crypto.v.html                 │
│ 42.7  43.4  0.7614   1.78%     2  coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/fiat_crypto.v.html                          │
│ 15.5  16.2  0.7187   4.64%   326  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Coord.v.html                                       │
│ 27.1  27.8  0.7048   2.60%   794  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                             │
│ 31.4  32.1  0.7012   2.23%   331  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Coord.v.html                                       │
│ 13.4  14.1  0.6670   4.98%   216  coq-fiat-crypto-with-bedrock/src/Fancy/Barrett256.v.html                                         │
│ 22.7  23.4  0.6333   2.79%   776  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                             │
│ 42.8  43.5  0.6241   1.46%   244  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Coord32.v.html                                     │
│ 7.78  8.39  0.6118   7.86%   484  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│ 13.1  13.7  0.6101   4.67%   572  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
🐇 Top 25 speed ups
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                              TOP 25 SPEED UPS                                                              │
│                                                                                                                                            │
│  OLD     NEW     DIFF     %DIFF    Ln                     FILE                                                                             │
├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│  7.56    0.848  -6.7156  -88.79%   602  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Limits/Examples/StructureEnrichedLimits.v.html     │
│  7.29    0.858  -6.4316  -88.23%   604  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Colimits/Examples/StructureEnrichedColimits.v.html │
│  36.7     32.1  -4.6666  -12.70%   835  coq-fiat-crypto-with-bedrock/src/Fancy/Compiler.v.html                                             │
│   109      104  -4.2948   -3.95%    22  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html                             │
│  55.6     51.6  -4.0119   -7.22%    27  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ToFancyWithCasts.v.html                           │
│  81.3     78.5  -2.7559   -3.39%    20  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/NBE.v.html                                        │
│  4.30     1.89  -2.4157  -56.15%   905  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                               │
│  3.47     1.27  -2.2034  -63.48%   112  coq-bedrock2/bedrock2/src/bedrock2Examples/cswap.v.html                                            │
│  3.44     1.26  -2.1813  -63.39%   112  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/cswap.v.html          │
│  66.2     64.1  -2.0966   -3.17%   608  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html      │
│   238      236  -1.8036   -0.76%   141  coq-fiat-crypto-with-bedrock/src/UnsaturatedSolinasHeuristics/Tests.v.html                         │
│  1.75    0.120  -1.6314  -93.14%   216  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Constructions/Product.v.html                      │
│  1.58   0.0397  -1.5445  -97.50%   731  coq-fiat-crypto-with-bedrock/src/AbstractInterpretation/ZRangeProofs.v.html                        │
│  4.74     3.25  -1.4838  -31.34%    19  coq-fiat-crypto-with-bedrock/src/Language/IdentifiersBasicGENERATED.v.html                         │
│  6.87     5.48  -1.3958  -20.30%    35  coq-fiat-crypto-with-bedrock/rupicola/src/Rupicola/Examples/Net/IPChecksum/IPChecksum.v.html       │
│  1.36  0.00474  -1.3600  -99.65%   368  coq-unimath/UniMath/CategoryTheory/Monoidal/Examples/LiftPoset.v.html                              │
│  20.9     19.6  -1.2945   -6.18%    24  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/MultiRetSplit.v.html                              │
│  1.53    0.278  -1.2522  -81.84%  1325  coq-fiat-crypto-with-bedrock/src/Fancy/Compiler.v.html                                             │
│  14.3     13.1  -1.2481   -8.72%    24  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/MulSplit.v.html                                   │
│  19.1     18.0  -1.1198   -5.87%    23  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/Arith.v.html                                      │
│  65.2     64.1  -1.1108   -1.70%   608  coq-bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html                                        │
│   134      133  -0.9998   -0.74%   155  coq-fiat-crypto-with-bedrock/src/UnsaturatedSolinasHeuristics/Tests.v.html                         │
│ 0.924  0.00480  -0.9197  -99.48%    64  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/Cartesian.v.html                         │
│  1.06    0.184  -0.8808  -82.72%   833  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Limits/Examples/StructureEnrichedLimits.v.html     │
│  1.07    0.186  -0.8807  -82.60%   835  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Colimits/Examples/StructureEnrichedColimits.v.html │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

@Janno

Janno commented May 23, 2026

Copy link
Copy Markdown
Contributor Author

@coqbot bench

@coqbot-app

coqbot-app Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor

🏁 Bench results:

┌─────────────────────────────────────┬─────────────────────────┬───────────────────────────────────────┬─────────────────────────┐
│                                     │      user time [s]      │           CPU instructions            │  max resident mem [KB]  │
│                                     │                         │                                       │                         │
│            package_name             │   NEW      OLD    PDIFF │      NEW             OLD        PDIFF │   NEW      OLD    PDIFF │
├─────────────────────────────────────┼─────────────────────────┼───────────────────────────────────────┼─────────────────────────┤
│             rocq-mathcomp-ssreflect │    1.08     1.09  -0.92 │     7130746419      7132186826  -0.02 │  593496   595460  -0.33 │
│                         coq-unimath │ 1814.64  1831.19  -0.90 │ 14948405562928  15264844547372  -2.07 │ 1099956  1095328   0.42 │
│ coq-neural-net-interp-computed-lite │  236.33   238.44  -0.88 │  2266330041217   2266105300660   0.01 │  879220   878708   0.06 │
│                           rocq-core │    6.88     6.92  -0.58 │    41661988300     41651969266   0.02 │  444112   444552  -0.10 │
│          rocq-mathcomp-finite-group │   26.72    26.81  -0.34 │   173302124864    173272622585   0.02 │  574348   574540  -0.03 │
│  rocq-mathcomp-group-representation │  104.25   104.57  -0.31 │   731509996445    731620688112  -0.02 │ 1713784  1713820  -0.00 │
│                  rocq-mathcomp-boot │   39.51    39.60  -0.23 │   233162196456    233166836750  -0.00 │  658400   658324   0.01 │
│         coq-rewriter-perf-SuperFast │  472.79   473.64  -0.18 │  3683034086809   3714357636819  -0.84 │ 1252784  1247712   0.41 │
│                      coq-verdi-raft │  494.65   495.37  -0.15 │  3427772350200   3427752747510   0.00 │  814648   817060  -0.30 │
│                       coq-fourcolor │ 1352.93  1354.08  -0.08 │ 12449047230215  12449133618086  -0.00 │ 1021436  1018024   0.34 │
│               coq-mathcomp-analysis │ 1154.07  1154.87  -0.07 │  8423819004772   8425333654686  -0.02 │ 1965904  1968888  -0.15 │
│          coq-performance-tests-lite │  900.08   899.69   0.04 │  7193704421572   7229430743610  -0.49 │ 1230604  1227808   0.23 │
│                        rocq-runtime │   75.83    75.79   0.05 │   551403497671    550740889365   0.12 │  495924   495176   0.15 │
│                        rocq-bignums │   25.25    25.23   0.08 │   160219145932    160176844258   0.03 │  459236   461264  -0.44 │
│                           coq-color │  231.79   231.57   0.10 │  1467002181777   1467002730462  -0.00 │ 1165704  1165284   0.04 │
│              coq-mathcomp-odd-order │  608.10   607.09   0.17 │  4311290242694   4311587572535  -0.01 │ 2637712  2640576  -0.11 │
│        coq-fiat-crypto-with-bedrock │ 7312.28  7299.95   0.17 │ 59832213180442  60196444988645  -0.61 │ 2978644  3001636  -0.77 │
│                       coq-fiat-core │   55.35    55.24   0.20 │   336940958112    336936201041   0.00 │  484636   484580   0.01 │
│                           coq-verdi │   43.60    43.51   0.21 │   289712456816    289716597360  -0.00 │  527888   527088   0.15 │
│                         coq-coqutil │   47.22    47.12   0.21 │   292503375405    292360209923   0.05 │  563492   565104  -0.29 │
│                        coq-bedrock2 │  359.53   358.57   0.27 │  2982313910335   2991615766445  -0.31 │  839428   835736   0.44 │
│                 rocq-mathcomp-field │  195.04   194.46   0.30 │  1454023075671   1454170583825  -0.01 │ 2302112  2301672   0.02 │
│                      coq-coquelicot │   39.42    39.30   0.31 │   237036797042    237033794360   0.00 │  827276   829164  -0.23 │
│                            coq-hott │  159.29   158.80   0.31 │  1073808542388   1074922624838  -0.10 │  474416   465676   1.88 │
│               coq-engine-bench-lite │  128.90   128.48   0.33 │   959780646655    959106412993   0.07 │ 1007980  1105932  -8.86 │
│              rocq-mathcomp-solvable │  100.17    99.79   0.38 │   674170390532    674115512067   0.01 │ 1123340  1123608  -0.02 │
│                 rocq-mathcomp-order │   81.63    81.32   0.38 │   599961524119    599879254883   0.01 │ 1600368  1602620  -0.14 │
│                        coq-coqprime │   53.37    53.16   0.40 │   362551952900    362543221528   0.00 │  824124   823920   0.02 │
│                    coq-fiat-parsers │  277.90   276.75   0.42 │  2122405740866   2122105706178   0.01 │ 2061448  2272600  -9.29 │
│               rocq-mathcomp-algebra │  332.46   331.02   0.44 │  2435982758262   2436042506705  -0.00 │ 1346592  1346084   0.04 │
│                            coq-corn │  662.67   658.10   0.69 │  4454431260862   4454326285344   0.00 │  768800   768084   0.09 │
│                         rocq-stdlib │  440.18   436.86   0.76 │  1555554472551   1555838781061  -0.02 │  630532   629872   0.10 │
│                        coq-rewriter │  334.58   332.04   0.76 │  2464747191922   2471590032427  -0.28 │ 1458816  1464712  -0.40 │
│                    coq-math-classes │   83.33    82.63   0.85 │   503197739208    503195802096   0.00 │  518988   518936   0.01 │
│                   coq-iris-examples │  368.04   364.60   0.94 │  2397169586579   2393860493324   0.14 │ 1090144  1087728   0.22 │
│                           rocq-elpi │   16.54    16.25   1.78 │   116612643200    116559366512   0.05 │  448700   448428   0.06 │
│                            coq-core │    2.81     2.76   1.81 │    18582118334     18573736737   0.05 │   90704    90740  -0.04 │
└─────────────────────────────────────┴─────────────────────────┴───────────────────────────────────────┴─────────────────────────┘

INFO: failed to install
coq-compcert (dependency install failed in NEW)
rocq-equations (in NEW)
coq-vst (dependency install failed in NEW)

rocq-metarocq-utils (dependency rocq-equations failed)
rocq-metarocq-common (dependency rocq-equations failed)
rocq-metarocq-template (dependency rocq-equations failed)
rocq-metarocq-pcuic (dependency rocq-equations failed)
rocq-metarocq-safechecker (dependency rocq-equations failed)
rocq-metarocq-erasure (dependency rocq-equations failed)
rocq-metarocq-translations (dependency rocq-equations failed)
coq-category-theory (dependency rocq-equations failed)

🐢 Top 25 slow downs
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                         TOP 25 SLOW DOWNS                                                          │
│                                                                                                                                    │
│ OLD   NEW    DIFF   %DIFF    Ln                     FILE                                                                           │
├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 56.0  60.0  3.9828   7.11%   512  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│ 51.2  55.1  3.8801   7.58%   567  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│ 59.4  63.0  3.5985   6.06%   659  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│ 43.8  47.4  3.5700   8.15%   256  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Jacobian.v.html                                    │
│ 41.3  44.5  3.2407   7.85%   539  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│ 54.7  56.9  2.1464   3.92%   296  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/Addchain.v.html                               │
│ 63.8  65.6  1.8616   2.92%   608  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html    │
│ 7.84  9.69  1.8471  23.56%  1831  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvFunctions.v.html │
│ 30.9  32.7  1.8439   5.97%   596  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│ 42.4  44.0  1.5954   3.76%   578  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/MMIO.v.html                 │
│ 21.5  22.8  1.2174   5.65%   616  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│ 21.1  22.2  1.1421   5.41%    49  coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html                          │
│ 42.3  43.5  1.1416   2.70%     2  coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/fiat_crypto.v.html                          │
│ 38.4  39.5  1.1136   2.90%  1423  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvFunctions.v.html │
│ 7.04  8.14  1.1071  15.73%   571  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Jacobian.v.html                                    │
│ 93.6  94.4  0.8365   0.89%   968  coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html                  │
│ 44.2  45.0  0.8300   1.88%     3  coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/WithBedrock/fiat_crypto.v.html              │
│ 44.2  45.1  0.8065   1.82%     3  coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/bedrock2_fiat_crypto.v.html                 │
│ 7.80  8.53  0.7334   9.40%   484  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│ 12.9  13.7  0.7123   5.50%   572  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│ 93.4  94.1  0.6823   0.73%   999  coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html                  │
│ 5.54  6.21  0.6730  12.16%   549  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Jacobian.v.html                                    │
│ 7.79  8.38  0.5855   7.51%   214  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Coord32.v.html                                     │
│ 7.92  8.50  0.5744   7.25%  1331  coq-mathcomp-odd-order/theories/PFsection9.v.html                                                │
│ 26.6  27.1  0.5707   2.15%    34  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/MontgomeryLadderRISCV.v.html             │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
🐇 Top 25 speed ups
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                              TOP 25 SPEED UPS                                                              │
│                                                                                                                                            │
│  OLD     NEW     DIFF     %DIFF    Ln                     FILE                                                                             │
├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│  11.6     4.89  -6.7595  -58.04%   194  coq-fiat-crypto-with-bedrock/src/Fancy/Barrett256.v.html                                           │
│  7.52    0.884  -6.6310  -88.24%   602  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Limits/Examples/StructureEnrichedLimits.v.html     │
│  7.37    0.933  -6.4355  -87.34%   604  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Colimits/Examples/StructureEnrichedColimits.v.html │
│  36.9     31.8  -5.0181  -13.61%   835  coq-fiat-crypto-with-bedrock/src/Fancy/Compiler.v.html                                             │
│  55.7     51.2  -4.4413   -7.98%    27  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ToFancyWithCasts.v.html                           │
│   108      104  -3.8912   -3.61%    22  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html                             │
│  81.4     78.5  -2.9421   -3.61%    20  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/NBE.v.html                                        │
│  4.24     1.74  -2.4937  -58.84%   199  coq-fiat-crypto-with-bedrock/src/Fancy/Montgomery256.v.html                                        │
│   203      200  -2.4435   -1.20%     8  coq-neural-net-interp-computed-lite/theories/MaxOfTwoNumbersSimpler/Computed/AllLogits.v.html      │
│  4.28     1.86  -2.4117  -56.41%   905  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                               │
│  3.49     1.30  -2.1991  -62.92%   112  coq-bedrock2/bedrock2/src/bedrock2Examples/cswap.v.html                                            │
│  3.50     1.33  -2.1654  -61.87%   112  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/cswap.v.html          │
│  1.73    0.118  -1.6152  -93.19%   216  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Constructions/Product.v.html                      │
│  2.99     1.40  -1.5899  -53.24%   256  coq-fiat-crypto-with-bedrock/src/Fancy/Barrett256.v.html                                           │
│  4.72     3.25  -1.4727  -31.20%    19  coq-fiat-crypto-with-bedrock/src/Language/IdentifiersBasicGENERATED.v.html                         │
│  6.86     5.45  -1.4030  -20.46%    35  coq-fiat-crypto-with-bedrock/rupicola/src/Rupicola/Examples/Net/IPChecksum/IPChecksum.v.html       │
│  1.36  0.00441  -1.3596  -99.68%   368  coq-unimath/UniMath/CategoryTheory/Monoidal/Examples/LiftPoset.v.html                              │
│  1.53    0.278  -1.2551  -81.87%  1325  coq-fiat-crypto-with-bedrock/src/Fancy/Compiler.v.html                                             │
│  14.3     13.1  -1.2233   -8.55%    24  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/MulSplit.v.html                                   │
│  20.9     19.7  -1.2147   -5.81%    24  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/MultiRetSplit.v.html                              │
│  1.21   0.0424  -1.1641  -96.49%   731  coq-fiat-crypto-with-bedrock/src/AbstractInterpretation/ZRangeProofs.v.html                        │
│  18.9     17.9  -0.9940   -5.26%    23  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/Arith.v.html                                      │
│ 0.920  0.00476  -0.9156  -99.48%    64  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/Cartesian.v.html                         │
│  1.08    0.191  -0.8859  -82.26%   835  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Colimits/Examples/StructureEnrichedColimits.v.html │
│  1.08    0.192  -0.8859  -82.21%   833  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Limits/Examples/StructureEnrichedLimits.v.html     │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

@Janno Janno marked this pull request as ready for review May 29, 2026 08:34
@Janno Janno requested a review from a team as a code owner May 29, 2026 08:34
Comment thread tactics/cbn.ml Outdated
let equal sigma a b =
a == b || (a.term == b.term && a.subst == b.subst) ||
(* TODO: add fast path that returns false on non-Rel terms whose head is not of the same shape.
Alternatively, fuse the equality check and the substitution *)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the fusing should be relatively simple using kind below no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I am not sure I know how to resolve the resulting type puzzle now that kind no longer returns a Constr shaped thing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

pushed a commit

Comment thread tactics/cbn.ml Outdated
let b = force sigma b in
a == b || EConstr.eq_constr sigma a b

let equal_under sigma n a b = equal sigma (liftn n a) (liftn n b)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is it possible that equal_under is not equivalent to equal? I don't see how lifting by the same amount can change equality. (it will certainly break the physical equality fast path though)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think you are right. I won't push a fix now to not interrupt the new bench job.

Comment thread tactics/cbn.ml Outdated
val best_state : Evd.evar_map -> constr * constr t -> Cst_stack.t -> constr * constr t
val zip : ?refold:bool -> Evd.evar_map -> constr * constr t -> constr
val best_state : inject:(constr -> 'a) -> equal:('a -> 'a -> bool) -> 'a * 'a t -> 'a Cst_stack.t -> 'a * 'a t
val zip : ?refold:bool -> Evd.evar_map ->

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

does this stuff actually need to be polymorphic? seems like we should monomorphize

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It seems it can be monomorphized. I pushed a commit.

Comment thread tactics/cbn.ml Outdated
[CbnClos.kind] view of the array; building that view allocates a closure
for every element even when [array_get]/[array_length] will discard most
of them. *)
let early_array_primitive = match Stack.strip_app stack with

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

having to do an extra strip_app at every step may be not great, but I think we can merge array_view and kind (by returning a wrapper around Constr.kind from CbnClos.kind)
incoming commit

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That seems like it helped a whole lot with the overhead on some array examples I have locally:

Master HEAD~ HEAD
4395962 3347798 3054980
15078524 11840342 10474563
56989652 45893889 40186233
69334 77151 71117
67199 83959 78945
69314 119648 70787
59248 55811 55575
59249 55822 55587
57083 61929 55574
8020239 6161145 5498511
29056622 23084271 20279234
4401443 3365103 3067474
8010337 6150323 5510858
15044076 11813227 10453421
29046469 23126957 20317893
57002056 45890300 40192347
21414032 14187242 12449045

(I had to turn two numbers into code because they happen to be valid SHA prefixes of existing commits 🤦 )

@SkySkimmer

Copy link
Copy Markdown
Contributor

@coqbot bench

@SkySkimmer SkySkimmer self-assigned this May 29, 2026
@SkySkimmer SkySkimmer requested a review from a team as a code owner May 29, 2026 11:58
Comment thread tactics/cbn.ml Outdated
| Evar (ev, args) -> notarray @@ Evar (ev, SList.Skip.map (mk_clos c.subst) args)
| Sort s -> notarray @@ Sort s
| Cast (b, k, t) -> notarray @@ Cast (mk_clos c.subst b, k, mk_clos c.subst t)
| Prod (na, t, b) -> notarray @@ Prod (na, mk_clos c.subst t, mk_clos c.subst b)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

further looking at this, is it really correct to not apply a lift to the subst under binders?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was also very surprised by this when I was playing around with the equality thing earlier. I did expect a lift here. The fact that nothing breaks probably means this bug is counteracted by another bug somewhere?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can be smarter by returning the substitution to the side instead of in the kind subterms, but it doesn't quite work 0fc36c7 (eg test suite prerequisite/list fails with Not_found)
I think because I didn't handle putting Fix/Case in the stack correctly but getting tired of this for today (also stack being polymorphic doesn't help with modifying this code)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just for my own notes: This is an example of a term that produces ill-scoped/ill-typed terms at least in debug output.

Goal forall (b : bool) (n : nat), True.
Proof.
  intros b n.
  Set Debug "RAKAM".
  Eval cbn in
    ((fun b : bool => match n return bool with O => true | S _ => b end) b).
(* ...
Debug: [RAKAM] <<n||ZCase(true| _UNBOUND_REL_1)>>
... *)                                                                                                                                

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think I got it, let's see how it does

Comment thread tactics/cbn.ml
let n = Array.length elems in
let term = mkArray (u, Array.init n (fun i -> mkRel (i + 1)), mkRel (n + 1), mkRel (n + 2)) in
let subst = List.fold_right Esubst.subs_cons (Array.to_list elems @ [def; ty]) id_subst in
mk_clos subst term

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this looks pretty messy, not sure how much we care about arrays though

@coqbot-app

coqbot-app Bot commented May 29, 2026

Copy link
Copy Markdown
Contributor

🏁 Bench results:

┌─────────────────────────────────────┬─────────────────────────┬───────────────────────────────────────┬─────────────────────────┐
│                                     │      user time [s]      │           CPU instructions            │  max resident mem [KB]  │
│                                     │                         │                                       │                         │
│            package_name             │   NEW      OLD    PDIFF │      NEW             OLD        PDIFF │   NEW      OLD    PDIFF │
├─────────────────────────────────────┼─────────────────────────┼───────────────────────────────────────┼─────────────────────────┤
│             rocq-mathcomp-ssreflect │    1.06     1.08  -1.85 │     7128121241      7125399233   0.04 │  595908   593924   0.33 │
│                         coq-unimath │ 1881.11  1899.18  -0.95 │ 15525926825903  15859499259585  -2.10 │ 2151472  2167336  -0.73 │
│                 rocq-mathcomp-order │   80.79    81.38  -0.72 │   600081850378    600174700407  -0.02 │ 1592872  1605252  -0.77 │
│                    coq-math-classes │   82.20    82.77  -0.69 │   502594353778    502588457125   0.00 │  513812   513916  -0.02 │
│         coq-rewriter-perf-SuperFast │  470.43   473.49  -0.65 │  3682988711692   3714580915211  -0.85 │ 1229904  1244740  -1.19 │
│                      coq-coquelicot │   39.01    39.19  -0.46 │   237027472599    237016085432   0.00 │  830960   831092  -0.02 │
│                           rocq-elpi │   16.36    16.42  -0.37 │   116811585468    116837047213  -0.02 │  453276   453144   0.03 │
│                           coq-verdi │   43.44    43.55  -0.25 │   289724966491    289703314857   0.01 │  526520   530952  -0.83 │
│                         rocq-stdlib │  437.32   438.18  -0.20 │  1555555760493   1555787747931  -0.01 │  629772   628144   0.26 │
│                       coq-fiat-core │   55.27    55.37  -0.18 │   336866277247    336828878226   0.01 │  481896   484492  -0.54 │
│                        coq-bedrock2 │  360.13   360.78  -0.18 │  2978406184665   2991188610244  -0.43 │  832492   835260  -0.33 │
│               coq-engine-bench-lite │  128.77   128.94  -0.13 │   961134286175    959382103004   0.18 │ 1107840  1106120   0.16 │
│          coq-performance-tests-lite │  898.68   899.77  -0.12 │  7191751469232   7225089538338  -0.46 │ 1228700  1211972   1.38 │
│                           coq-color │  230.51   230.70  -0.08 │  1466890075472   1466776487817   0.01 │ 1165528  1165652  -0.01 │
│                      coq-verdi-raft │  494.04   494.33  -0.06 │  3427560363181   3427521318324   0.00 │  832124   814476   2.17 │
│        coq-fiat-crypto-with-bedrock │ 7284.78  7287.88  -0.04 │ 59772292133930  60194882920594  -0.70 │ 2987088  2972544   0.49 │
│                        rocq-bignums │   25.27    25.28  -0.04 │   160197851748    160202077981  -0.00 │  462676   463152  -0.10 │
│                  rocq-mathcomp-boot │   39.54    39.52   0.05 │   233236398972    233230841129   0.00 │  661468   658284   0.48 │
│                            coq-hott │  158.64   158.44   0.13 │  1072988039435   1074943002039  -0.18 │  470584   465748   1.04 │
│                             coq-vst │  845.13   843.79   0.16 │  6403532230116   6403146614598   0.01 │ 2088664  2088660   0.00 │
│                        coq-compcert │  304.44   303.73   0.23 │  1995825540542   1995745129648   0.00 │ 1193392  1193084   0.03 │
│                    coq-fiat-parsers │  276.98   276.29   0.25 │  2121770242215   2121805906698  -0.00 │ 2272480  2272584  -0.00 │
│                        rocq-runtime │   76.43    76.22   0.28 │   551393776592    550759415153   0.12 │  494532   494024   0.10 │
│                   coq-iris-examples │  365.85   364.70   0.32 │  2394799991961   2393748111233   0.04 │ 1075960  1086228  -0.95 │
│                         coq-coqutil │   47.50    47.32   0.38 │   292369425396    292286289688   0.03 │  566084   563548   0.45 │
│                        coq-rewriter │  332.61   331.03   0.48 │  2462846216115   2471352505448  -0.34 │ 1425696  1466856  -2.81 │
│                        coq-coqprime │   53.45    53.16   0.55 │   362429727187    362420399939   0.00 │  824368   822136   0.27 │
│                           rocq-core │    6.87     6.83   0.59 │    41663336559     41664127316  -0.00 │  444116   445076  -0.22 │
│          rocq-mathcomp-finite-group │   26.74    26.58   0.60 │   173312871650    173280789198   0.02 │  576172   576664  -0.09 │
│ coq-neural-net-interp-computed-lite │  237.79   235.25   1.08 │  2265899535593   2265664781355   0.01 │  883144   880176   0.34 │
│                            coq-corn │  664.51   656.43   1.23 │  4452977463470   4452937354213   0.00 │  773132   773212  -0.01 │
│                            coq-core │    2.79     2.72   2.57 │    18576623988     18578144209  -0.01 │   90600    90928  -0.36 │
└─────────────────────────────────────┴─────────────────────────┴───────────────────────────────────────┴─────────────────────────┘

INFO: failed to install
rocq-mathcomp-algebra (in NEW)
rocq-equations (in NEW)

rocq-mathcomp-solvable (dependency rocq-mathcomp-algebra failed)
rocq-mathcomp-field (dependency rocq-mathcomp-algebra failed)
rocq-mathcomp-group-representation (dependency rocq-mathcomp-algebra failed)
coq-mathcomp-odd-order (dependency rocq-mathcomp-algebra failed)
coq-mathcomp-analysis (dependency rocq-mathcomp-algebra failed)
rocq-metarocq-utils (dependency rocq-equations failed)
rocq-metarocq-common (dependency rocq-equations failed)
rocq-metarocq-template (dependency rocq-equations failed)
rocq-metarocq-pcuic (dependency rocq-equations failed)
rocq-metarocq-safechecker (dependency rocq-equations failed)
rocq-metarocq-erasure (dependency rocq-equations failed)
rocq-metarocq-translations (dependency rocq-equations failed)
coq-fourcolor (dependency rocq-mathcomp-algebra failed)
coq-category-theory (dependency rocq-equations failed)

🐢 Top 25 slow downs
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                           TOP 25 SLOW DOWNS                                                           │
│                                                                                                                                       │
│  OLD    NEW    DIFF    %DIFF    Ln                     FILE                                                                           │
├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│  50.9   54.3  3.4507    6.78%   567  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│  59.3   62.4  3.1062    5.24%   659  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│  55.9   58.9  3.0517    5.46%   512  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│  41.1   43.5  2.4179    5.88%   539  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│  43.6   46.0  2.3304    5.34%   256  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Jacobian.v.html                                    │
│  63.0   65.2  2.2170    3.52%   608  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html    │
│  54.2   56.4  2.1698    4.00%   296  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/Addchain.v.html                               │
│   200    202  2.1112    1.06%     8  coq-neural-net-interp-computed-lite/theories/MaxOfTwoNumbersSimpler/Computed/AllLogits.v.html    │
│  7.81   9.64  1.8321   23.45%  1831  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvFunctions.v.html │
│  30.9   32.6  1.7060    5.52%   596  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│ 0.831   2.20  1.3736  165.27%   931  coq-unimath/UniMath/CategoryTheory/ComprehensionCats/CwfFromCompCatWithUniv.v.html               │
│  21.6   22.7  1.1029    5.11%   616  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│  42.4   43.5  1.0919    2.57%   578  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/MMIO.v.html                 │
│  38.5   39.3  0.7520    1.95%  1423  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvFunctions.v.html │
│  7.76   8.51  0.7517    9.69%   484  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│  2.47   3.21  0.7389   29.88%    34  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html                           │
│  22.7   23.4  0.6739    2.96%   776  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                             │
│  13.0   13.6  0.6233    4.80%   572  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│  82.7   83.3  0.6106    0.74%    48  coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html                          │
│  5.57   6.10  0.5336    9.58%   549  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Jacobian.v.html                                    │
│  7.73   8.26  0.5329    6.90%   214  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Coord32.v.html                                     │
│  1.58   2.06  0.4834   30.67%    42  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ToFancyWithCasts.v.html                         │
│  28.5   29.0  0.4610    1.62%    31  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/MontgomeryLadderRISCV.v.html             │
│  38.1   38.6  0.4516    1.18%   224  coq-performance-tests-lite/PerformanceExperiments/rewrite_lift_lets_map.v.html                   │
│ 0.189  0.630  0.4405  232.78%   458  coq-unimath/UniMath/Combinatorics/FLists.v.html                                                  │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
🐇 Top 25 speed ups
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                             TOP 25 SPEED UPS                                                              │
│                                                                                                                                           │
│ OLD     NEW     DIFF     %DIFF    Ln                     FILE                                                                             │
├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ 11.6     4.91  -6.6911  -57.66%   194  coq-fiat-crypto-with-bedrock/src/Fancy/Barrett256.v.html                                           │
│ 7.42    0.842  -6.5755  -88.64%   602  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Limits/Examples/StructureEnrichedLimits.v.html     │
│ 7.10    0.872  -6.2276  -87.71%   604  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Colimits/Examples/StructureEnrichedColimits.v.html │
│ 55.4     50.2  -5.1847   -9.36%    27  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ToFancyWithCasts.v.html                           │
│ 36.5     31.6  -4.9337  -13.51%   835  coq-fiat-crypto-with-bedrock/src/Fancy/Compiler.v.html                                             │
│ 81.1     77.4  -3.7844   -4.66%    20  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/NBE.v.html                                        │
│  108      104  -3.3511   -3.11%    22  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html                             │
│ 4.24     1.76  -2.4714  -58.35%   199  coq-fiat-crypto-with-bedrock/src/Fancy/Montgomery256.v.html                                        │
│ 4.22     1.83  -2.3910  -56.61%   905  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                               │
│ 3.45     1.25  -2.1958  -63.65%   112  coq-bedrock2/bedrock2/src/bedrock2Examples/cswap.v.html                                            │
│ 3.45     1.26  -2.1913  -63.52%   112  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/cswap.v.html          │
│ 17.8     16.2  -1.6240   -9.13%   833  coq-unimath/UniMath/CategoryTheory/ComprehensionCats/CwfFromCompCatWithUniv.v.html                 │
│ 1.74    0.120  -1.6157  -93.10%   216  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Constructions/Product.v.html                      │
│ 3.00     1.41  -1.5857  -52.93%   256  coq-fiat-crypto-with-bedrock/src/Fancy/Barrett256.v.html                                           │
│ 4.71     3.22  -1.4876  -31.59%    19  coq-fiat-crypto-with-bedrock/src/Language/IdentifiersBasicGENERATED.v.html                         │
│ 6.80     5.43  -1.3701  -20.14%    35  coq-fiat-crypto-with-bedrock/rupicola/src/Rupicola/Examples/Net/IPChecksum/IPChecksum.v.html       │
│ 1.36  0.00432  -1.3585  -99.68%   368  coq-unimath/UniMath/CategoryTheory/Monoidal/Examples/LiftPoset.v.html                              │
│ 20.8     19.5  -1.3080   -6.28%    24  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/MultiRetSplit.v.html                              │
│ 1.52    0.245  -1.2781  -83.91%  1325  coq-fiat-crypto-with-bedrock/src/Fancy/Compiler.v.html                                             │
│ 14.4     13.2  -1.2420   -8.61%    24  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/MulSplit.v.html                                   │
│ 31.8     30.5  -1.2260   -3.86%   157  coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html               │
│ 1.22   0.0421  -1.1744  -96.54%   731  coq-fiat-crypto-with-bedrock/src/AbstractInterpretation/ZRangeProofs.v.html                        │
│ 32.9     31.7  -1.1606   -3.53%   121  coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html               │
│ 31.6     30.5  -1.0620   -3.37%   198  coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html               │
│ 18.8     17.8  -1.0455   -5.56%    23  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/Arith.v.html                                      │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

@SkySkimmer

Copy link
Copy Markdown
Contributor

now with the equal change
@coqbot bench

@coqbot-app

coqbot-app Bot commented May 30, 2026

Copy link
Copy Markdown
Contributor

🏁 Bench results:

┌─────────────────────────────────────┬──────────────────────────┬────────────────────────────────────────┬─────────────────────────┐
│                                     │      user time [s]       │            CPU instructions            │  max resident mem [KB]  │
│                                     │                          │                                        │                         │
│            package_name             │   NEW      OLD    PDIFF  │      NEW             OLD        PDIFF  │   NEW      OLD    PDIFF │
├─────────────────────────────────────┼──────────────────────────┼────────────────────────────────────────┼─────────────────────────┤
│                           rocq-core │    6.79     6.86   -1.02 │    41674161763     41664672862    0.02 │  441696   445708  -0.90 │
│         coq-rewriter-perf-SuperFast │  469.85   473.50   -0.77 │  3684085521346   3714224229694   -0.81 │ 1256592  1241036   1.25 │
│                      coq-coquelicot │   39.29    39.47   -0.46 │   236638440572    236739643147   -0.04 │  830168   830296  -0.02 │
│               coq-engine-bench-lite │  128.06   128.63   -0.44 │   958619091362    962061876766   -0.36 │ 1107052  1106348   0.06 │
│                           rocq-elpi │   16.39    16.46   -0.43 │   116820646439    116783654142    0.03 │  453396   452932   0.10 │
│                  rocq-mathcomp-boot │   39.45    39.56   -0.28 │   233252583044    233220055357    0.01 │  661424   658476   0.45 │
│                    coq-math-classes │   82.96    83.03   -0.08 │   503181286324    503225824475   -0.01 │  513824   514432  -0.12 │
│                        rocq-runtime │   76.10    76.12   -0.03 │   551599507241    550714139190    0.16 │  495612   495344   0.05 │
│                       coq-fourcolor │ 1353.84  1353.32    0.04 │ 12447541922716  12448076260705   -0.00 │ 1018096  1021476  -0.33 │
│          coq-performance-tests-lite │  900.02   899.38    0.07 │  7191368731183   7227951697847   -0.51 │ 1221888  1234220  -1.00 │
│              rocq-mathcomp-solvable │  100.04    99.94    0.10 │   674167379987    674205122231   -0.01 │ 1124060  1123932   0.01 │
│                        coq-coqprime │   53.19    53.13    0.11 │   362672655957    362695506205   -0.01 │  824012   823996   0.00 │
│          rocq-mathcomp-finite-group │   26.75    26.70    0.19 │   173306038760    173299600423    0.00 │  574836   578232  -0.59 │
│              coq-mathcomp-odd-order │  607.78   606.31    0.24 │  4311318593725   4312052623025   -0.02 │ 2676560  2638612   1.44 │
│               coq-mathcomp-analysis │ 1186.80  1182.57    0.36 │  8676716566194   8679109306962   -0.03 │ 2069684  2069500   0.01 │
│                        coq-compcert │  304.96   303.84    0.37 │  1996580991307   1996482961307    0.00 │ 1189068  1190520  -0.12 │
│               rocq-mathcomp-algebra │  370.51   369.13    0.37 │  2707368093811   2707336893601    0.00 │ 1345384  1346592  -0.09 │
│                       coq-fiat-core │   55.55    55.32    0.42 │   337154304146    337145374058    0.00 │  480140   485344  -1.07 │
│                    coq-fiat-parsers │  277.63   276.34    0.47 │  2122742785943   2122477070832    0.01 │ 2062716  2272448  -9.23 │
│                             coq-vst │  847.80   843.79    0.48 │  6399223301899   6400180386632   -0.01 │ 2090772  2090604   0.01 │
│                      coq-verdi-raft │  495.32   492.81    0.51 │  3423858444581   3424519516196   -0.02 │  819048   818856   0.02 │
│  rocq-mathcomp-group-representation │  104.43   103.88    0.53 │   731175467506    731160792842    0.00 │ 1709884  1711720  -0.11 │
│                 rocq-mathcomp-order │   81.75    81.30    0.55 │   600009556049    600155728131   -0.02 │ 1593860  1603756  -0.62 │
│                   coq-iris-examples │  366.00   363.97    0.56 │  2392660333637   2391776957827    0.04 │ 1077744  1084036  -0.58 │
│                 rocq-mathcomp-field │  195.21   193.96    0.64 │  1453632842306   1453534568944    0.01 │ 2289268  2289140   0.01 │
│                           coq-color │  232.87   231.00    0.81 │  1467979355884   1467989441406   -0.00 │ 1165616  1164084   0.13 │
│                           coq-verdi │   43.48    43.12    0.83 │   288900192206    289003150490   -0.04 │  527884   527720   0.03 │
│                            coq-corn │  662.04   656.37    0.86 │  4454353405298   4454493798889   -0.00 │  767972   768020  -0.01 │
│                        coq-rewriter │  334.72   331.22    1.06 │  2463365722361   2471809401983   -0.34 │ 1448936  1466868  -1.22 │
│                        rocq-bignums │   25.33    25.04    1.16 │   160276886363    160220430222    0.04 │  463396   459080   0.94 │
│                         rocq-stdlib │  442.74   437.17    1.27 │  1555482220425   1555789976304   -0.02 │  630508   632288  -0.28 │
│                         coq-coqutil │   47.69    46.93    1.62 │   292983835149    292871003244    0.04 │  563948   565892  -0.34 │
│ coq-neural-net-interp-computed-lite │  240.01   235.20    2.05 │  2264734213692   2264690766456    0.00 │  880356   880448  -0.01 │
│             rocq-mathcomp-ssreflect │    1.10     1.07    2.80 │     7128238769      7126234096    0.03 │  594040   593828   0.04 │
│                            coq-core │    2.86     2.73    4.76 │    18581263542     18577682128    0.02 │   90784    90796  -0.01 │
│                            coq-hott │  215.32   159.08   35.35 │  1581971762089   1074968310667   47.16 │  476620   466076   2.26 │
│                         coq-unimath │ 5813.80  1898.57  206.22 │ 49829651027692  15845470433828  214.47 │ 2281584  2166016   5.34 │
└─────────────────────────────────────┴──────────────────────────┴────────────────────────────────────────┴─────────────────────────┘

INFO: failed to install
rocq-equations (in NEW)
coq-bedrock2 (in NEW)
coq-fiat-crypto-with-bedrock (in NEW)

rocq-metarocq-utils (dependency rocq-equations failed)
rocq-metarocq-common (dependency rocq-equations failed)
rocq-metarocq-template (dependency rocq-equations failed)
rocq-metarocq-pcuic (dependency rocq-equations failed)
rocq-metarocq-safechecker (dependency rocq-equations failed)
rocq-metarocq-erasure (dependency rocq-equations failed)
rocq-metarocq-translations (dependency rocq-equations failed)
coq-category-theory (dependency rocq-equations failed)

🐢 Top 25 slow downs
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                                TOP 25 SLOW DOWNS                                                                 │
│                                                                                                                                                  │
│   OLD      NEW      DIFF        %DIFF     Ln                     FILE                                                                            │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│    0.235    3773  3773.0919  1604383.08%  225  coq-unimath/UniMath/CategoryTheory/Monads/KleisliCategory.v.html                                  │
│   0.0112    55.1    55.1096   492137.95%  338  coq-unimath/UniMath/Combinatorics/FLists.v.html                                                   │
│   0.0233    27.9    27.9209   119708.86%  108  coq-hott/theories/Colimits/Colimit_Flattening.v.html                                              │
│    0.237    21.3    21.0139     8860.71%  373  coq-unimath/UniMath/Combinatorics/FLists.v.html                                                   │
│  0.00221    20.6    20.5560   928875.96%  267  coq-hott/theories/Homotopy/CayleyDickson.v.html                                                   │
│    0.189    17.0    16.7652     8857.21%  458  coq-unimath/UniMath/Combinatorics/FLists.v.html                                                   │
│    0.150    13.6    13.4429     8958.15%  495  coq-unimath/UniMath/Combinatorics/FLists.v.html                                                   │
│    0.130    12.1    11.9692     9193.07%  475  coq-unimath/UniMath/Combinatorics/FLists.v.html                                                   │
│   0.0146    6.83     6.8156    46602.50%  116  coq-unimath/UniMath/CategoryTheory/MarkovCategories/RelativeProduct.v.html                        │
│   0.0146    6.75     6.7374    46080.59%  128  coq-unimath/UniMath/CategoryTheory/MarkovCategories/RelativeProduct.v.html                        │
│      200     204     4.3273        2.16%    8  coq-neural-net-interp-computed-lite/theories/MaxOfTwoNumbersSimpler/Computed/AllLogits.v.html     │
│   0.0531    4.10     4.0515     7627.94%  374  coq-unimath/UniMath/Combinatorics/FLists.v.html                                                   │
│    0.226    2.88     2.6562     1174.22%  444  coq-unimath/UniMath/CategoryTheory/TwoSidedDisplayedCats/Examples/DispCatOnTwoSidedDispCat.v.html │
│    0.227    2.88     2.6562     1172.05%  456  coq-unimath/UniMath/CategoryTheory/TwoSidedDisplayedCats/Examples/DispCatOnTwoSidedDispCat.v.html │
│   0.0355    2.43     2.3993     6762.10%  472  coq-unimath/UniMath/CategoryTheory/PseudoElements.v.html                                          │
│    0.583    2.63     2.0494      351.60%  347  coq-unimath/UniMath/CategoryTheory/TwoSidedDisplayedCats/Examples/DispCatOnTwoSidedDispCat.v.html │
│    0.613    2.63     2.0193      329.48%  334  coq-unimath/UniMath/CategoryTheory/TwoSidedDisplayedCats/Examples/DispCatOnTwoSidedDispCat.v.html │
│    0.105    1.91     1.8057     1720.67%  124  coq-hott/theories/Algebra/Universal/Algebra.v.html                                                │
│     48.4    50.2     1.7587        3.63%  376  coq-unimath/UniMath/ModelCategories/Generated/LNWFSMonoidalStructure.v.html                       │
│ 0.000925    1.50     1.5001   162177.19%  180  coq-hott/theories/Colimits/Colimit.v.html                                                         │
│   0.0201    1.16     1.1426     5687.40%  263  coq-unimath/UniMath/CategoryTheory/TwoSidedDisplayedCats/Examples/DispCatOnTwoSidedDispCat.v.html │
│   0.0119    1.04     1.0314     8679.31%  229  coq-unimath/UniMath/CategoryTheory/TwoSidedDisplayedCats/Examples/DispCatOnTwoSidedDispCat.v.html │
│   0.0120    1.00     0.9918     8244.68%  246  coq-unimath/UniMath/CategoryTheory/TwoSidedDisplayedCats/Examples/DispCatOnTwoSidedDispCat.v.html │
│   40.087  40.937     0.8500        2.12%  834  coq-vst/veric/binop_lemmas4.v.html                                                                │
│    0.413    1.24     0.8322      201.61%  816  coq-unimath/UniMath/HomologicalAlgebra/CohomologyComplex.v.html                                   │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
🐇 Top 25 speed ups
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                              TOP 25 SPEED UPS                                                              │
│                                                                                                                                            │
│  OLD     NEW      DIFF     %DIFF   Ln                     FILE                                                                             │
├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│  7.38     0.834  -6.5416  -88.69%  602  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Limits/Examples/StructureEnrichedLimits.v.html     │
│  7.24     0.867  -6.3710  -88.02%  604  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Colimits/Examples/StructureEnrichedColimits.v.html │
│  1.74    0.0210  -1.7213  -98.80%  216  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Constructions/Product.v.html                      │
│  1.37   0.00431  -1.3647  -99.69%  368  coq-unimath/UniMath/CategoryTheory/Monoidal/Examples/LiftPoset.v.html                              │
│ 0.932    0.0195  -0.9122  -97.91%   64  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/Cartesian.v.html                         │
│  1.07     0.204  -0.8615  -80.83%  835  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Colimits/Examples/StructureEnrichedColimits.v.html │
│  1.07     0.212  -0.8564  -80.17%  833  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Limits/Examples/StructureEnrichedLimits.v.html     │
│  18.4      17.6  -0.7319   -3.98%   32  coq-performance-tests-lite/src/pattern.v.html                                                      │
│ 0.740    0.0303  -0.7096  -95.90%  990  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Limits/Examples/StructureEnrichedLimits.v.html     │
│ 0.678    0.0273  -0.6509  -95.97%  992  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Colimits/Examples/StructureEnrichedColimits.v.html │
│  94.2      93.5  -0.6456   -0.69%  999  coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html                    │
│ 0.542  0.000530  -0.5419  -99.90%  454  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/PointedPosetStrict.v.html                │
│  2.14      1.65  -0.4918  -22.95%  313  rocq-stdlib/theories/Strings/Byte.v.html                                                           │
│ 0.434   0.00770  -0.4261  -98.23%  174  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/Cartesian.v.html                         │
│  1.29     0.873  -0.4205  -32.51%  200  rocq-stdlib/theories/Numbers/HexadecimalNat.v.html                                                 │
│  2.61      2.19  -0.4163  -15.97%  213  rocq-stdlib/theories/setoid_ring/Ncring_tac.v.html                                                 │
│ 0.416   0.00115  -0.4150  -99.72%  409  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/PointedPosetStrict.v.html                │
│ 0.595     0.196  -0.3998  -67.14%  940  coq-unimath/UniMath/CategoryTheory/GrothendieckConstruction/IsPullback.v.html                      │
│  27.1      26.8  -0.3815   -1.41%   13  coq-fourcolor/theories/proof/job531to534.v.html                                                    │
│ 0.447    0.0672  -0.3796  -84.95%  625  coq-unimath/UniMath/CategoryTheory/LeftKanExtension.v.html                                         │
│  1.24     0.871  -0.3665  -29.62%  215  rocq-stdlib/theories/setoid_ring/Ncring_tac.v.html                                                 │
│  3.07      2.74  -0.3208  -10.46%  597  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/SetGroupoidComprehension.v.html          │
│ 0.492     0.180  -0.3125  -63.51%  141  rocq-stdlib/theories/Numbers/DecimalNat.v.html                                                     │
│  3.85      3.54  -0.3117   -8.09%  492  rocq-stdlib/theories/Reals/Cauchy/ConstructiveCauchyRealsMult.v.html                               │
│ 0.359    0.0573  -0.3022  -84.06%  955  coq-unimath/UniMath/CategoryTheory/ComprehensionCats/CwfFromCompCatWithUniv.v.html                 │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

@SkySkimmer

Copy link
Copy Markdown
Contributor

conclusion: 9a772ab bad

@SkySkimmer SkySkimmer force-pushed the janno/cbn-delayed-subst branch from 9a772ab to 6edd61e Compare May 30, 2026 06:50
@SkySkimmer

Copy link
Copy Markdown
Contributor

@coqbot bench

@SkySkimmer SkySkimmer force-pushed the janno/cbn-delayed-subst branch from 65f0650 to 0b61286 Compare June 1, 2026 22:32
@SkySkimmer

Copy link
Copy Markdown
Contributor

rebased to avoid overlay problems

@coqbot bench

@coqbot-app

coqbot-app Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

🏁 Bench results:

┌─────────────────────────────────────┬─────────────────────────┬───────────────────────────────────────┬─────────────────────────┐
│                                     │      user time [s]      │           CPU instructions            │  max resident mem [KB]  │
│                                     │                         │                                       │                         │
│            package_name             │   NEW      OLD    PDIFF │      NEW             OLD        PDIFF │   NEW      OLD    PDIFF │
├─────────────────────────────────────┼─────────────────────────┼───────────────────────────────────────┼─────────────────────────┤
│                         coq-unimath │ 1857.65  1892.93  -1.86 │ 15393436635035  15720134278862  -2.08 │ 1639004  1729356  -5.22 │
│                 rocq-metarocq-utils │   24.36    24.65  -1.18 │   157130968398    159820941016  -1.68 │  598440   597680   0.13 │
│         coq-rewriter-perf-SuperFast │  460.71   466.09  -1.15 │  3616813212899   3650910661909  -0.93 │ 1243832  1243012   0.07 │
│          rocq-mathcomp-finite-group │   26.39    26.62  -0.86 │   172287924077    172265871368   0.01 │  570656   568416   0.39 │
│        coq-fiat-crypto-with-bedrock │ 7185.93  7238.61  -0.73 │ 59081140591579  59597759361136  -0.87 │ 2875504  2827224   1.71 │
│                       coq-fourcolor │ 1351.42  1360.92  -0.70 │ 12429676934648  12429678489359  -0.00 │ 1017936  1018208  -0.03 │
│                           coq-verdi │   43.17    43.39  -0.51 │   287856458883    287857331096  -0.00 │  524280   528700  -0.84 │
│                      coq-verdi-raft │  490.00   492.24  -0.46 │  3402833048871   3402635188788   0.01 │  826964   823660   0.40 │
│                        rocq-bignums │   25.18    25.28  -0.40 │   160406970820    160418769767  -0.01 │  463020   462788   0.05 │
│                        coq-compcert │  305.16   306.28  -0.37 │  1997935148806   1998115329897  -0.01 │ 1204008  1200624   0.28 │
│                rocq-metarocq-common │   41.37    41.52  -0.36 │   268237765738    268228297065   0.00 │  905156   902224   0.32 │
│              rocq-mathcomp-solvable │   97.86    98.21  -0.36 │   665865826743    665795043433   0.01 │ 1096408  1096584  -0.02 │
│  rocq-mathcomp-group-representation │  103.61   103.97  -0.35 │   729430815840    730198049716  -0.11 │ 1708884  1709096  -0.01 │
│                      coq-coquelicot │   38.79    38.92  -0.33 │   235175277569    235179503338  -0.00 │  822252   821052   0.15 │
│                            coq-corn │  639.49   641.44  -0.30 │  4329508116446   4329697396632  -0.00 │  617256   617384  -0.02 │
│                        coq-rewriter │  329.17   329.98  -0.25 │  2440535890308   2457398666953  -0.69 │ 1399600  1401436  -0.13 │
│               coq-mathcomp-analysis │ 1180.04  1182.66  -0.22 │  8695271941308   8695148227777   0.00 │ 2071692  2071648   0.00 │
│          coq-performance-tests-lite │  882.16   884.05  -0.21 │  7067505722286   7104891526112  -0.53 │ 1492116  1513164  -1.39 │
│                           coq-color │  229.45   229.90  -0.20 │  1457063634143   1456987850417   0.01 │ 1161628  1158700   0.25 │
│                 coq-category-theory │  636.92   637.90  -0.15 │  4770284787749   4764891950642   0.11 │ 6748220  6513788   3.60 │
│                           rocq-core │    6.74     6.75  -0.15 │    41354594015     41368918946  -0.03 │  443584   442944   0.14 │
│                            coq-hott │  157.43   157.66  -0.15 │  1057413157604   1057869876956  -0.04 │  457560   460248  -0.58 │
│                 rocq-mathcomp-order │   81.26    81.37  -0.14 │   600792252105    600790685765   0.00 │ 1609188  1610936  -0.11 │
│              rocq-metarocq-template │   81.52    81.61  -0.11 │   559789764983    560762952410  -0.17 │ 1105588  1102984   0.24 │
│                        coq-coqprime │   57.02    57.04  -0.04 │   393889806439    393892972097  -0.00 │  817928   817928   0.00 │
│              coq-mathcomp-odd-order │  599.80   599.98  -0.03 │  4275171651734   4274863030518   0.01 │ 2646012  2648412  -0.09 │
│                    coq-fiat-parsers │  272.92   273.00  -0.03 │  2092481215096   2092396221796   0.00 │ 2037028  2036596   0.02 │
│                   coq-iris-examples │  365.67   365.70  -0.01 │  2384883416820   2384792088844   0.00 │ 1074780  1065832   0.84 │
│                         coq-coqutil │   47.24    47.24   0.00 │   292625145019    292642646932  -0.01 │  563752   563456   0.05 │
│               rocq-mathcomp-algebra │  368.79   368.78   0.00 │  2702905725719   2702823518304   0.00 │ 1349804  1347380   0.18 │
│                    coq-math-classes │   82.19    82.18   0.01 │   498293625589    498285835488   0.00 │  516744   519220  -0.48 │
│                       coq-fiat-core │   55.20    55.15   0.09 │   335868812964    335809686456   0.02 │  483052   482880   0.04 │
│                  rocq-mathcomp-boot │   39.39    39.35   0.10 │   232083448641    232043988016   0.02 │  657440   657552  -0.02 │
│          rocq-metarocq-translations │   15.28    15.26   0.13 │   108627593265    108685115939  -0.05 │  780896   782456  -0.20 │
│                        rocq-runtime │   76.37    76.24   0.17 │   551956068820    551279335266   0.12 │  494864   494460   0.08 │
│                         rocq-stdlib │  418.54   417.72   0.20 │  1508159008319   1508763575948  -0.04 │  759588   757188   0.32 │
│                 rocq-mathcomp-field │  193.62   192.87   0.39 │  1451340424452   1451543860859  -0.01 │ 2288964  2288984  -0.00 │
│ coq-neural-net-interp-computed-lite │  239.04   237.67   0.58 │  2264452707271   2264364211213   0.00 │  881180   879256   0.22 │
│                           rocq-elpi │   16.34    16.21   0.80 │   116673010686    116664323649   0.01 │  451228   451112   0.03 │
│                      rocq-equations │    8.59     8.51   0.94 │    59071642346     59095875357  -0.04 │  402788   400396   0.60 │
│               coq-engine-bench-lite │  129.29   127.96   1.04 │   955216125544    951330264045   0.41 │ 1005636  1005572   0.01 │
│                            coq-core │    2.76     2.73   1.10 │    18654178879     18618549545   0.19 │   90832    90796   0.04 │
│             rocq-mathcomp-ssreflect │    1.12     1.10   1.82 │     7671936486      7671816348   0.00 │  591812   593700  -0.32 │
└─────────────────────────────────────┴─────────────────────────┴───────────────────────────────────────┴─────────────────────────┘

INFO: failed to install
rocq-metarocq-pcuic (in NEW)
coq-bedrock2 (in NEW)
coq-vst (in NEW)

rocq-metarocq-safechecker (dependency rocq-metarocq-pcuic failed)
rocq-metarocq-erasure (dependency rocq-metarocq-pcuic failed)

🐢 Top 25 slow downs
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                           TOP 25 SLOW DOWNS                                                            │
│                                                                                                                                        │
│  OLD     NEW    DIFF    %DIFF    Ln                     FILE                                                                           │
├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│   23.4   26.8  3.4139   14.62%   129  coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/Projective.v.html                            │
│   58.0   60.5  2.4624    4.24%   659  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│   55.0   56.9  1.8272    3.32%   512  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│   50.7   52.5  1.7198    3.39%   567  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│   40.7   42.3  1.5163    3.72%   235  coq-category-theory/Construction/DecoratedCospan/Category.v.html                                 │
│   43.2   44.7  1.4626    3.39%   256  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Jacobian.v.html                                    │
│   54.0   55.4  1.4005    2.59%   296  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/Addchain.v.html                               │
│   41.2   42.5  1.3790    3.35%   539  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
│    202    204  1.1821    0.58%     8  coq-neural-net-interp-computed-lite/theories/MaxOfTwoNumbersSimpler/Computed/AllLogits.v.html    │
│   87.7   88.8  1.0934    1.25%   999  coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html                  │
│   87.9   89.0  1.0928    1.24%   968  coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html                  │
│   30.3   31.3  0.9954    3.28%   596  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│   2.46   3.27  0.8059   32.72%    34  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html                           │
│   6.44   7.19  0.7433   11.54%  1831  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvFunctions.v.html │
│   21.0   21.7  0.6860    3.26%   616  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│  0.236  0.713  0.4775  202.40%   586  rocq-stdlib/theories/Strings/Byte.v.html                                                         │
│   12.6   13.1  0.4104    3.25%   572  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                            │
│  0.210  0.612  0.4021  191.85%   458  coq-unimath/UniMath/Combinatorics/FLists.v.html                                                  │
│   18.4   18.7  0.3768    2.05%   481  coq-verdi-raft/theories/RaftProofs/EndToEndLinearizability.v.html                                │
│   79.7   80.1  0.3708    0.47%    48  coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html                          │
│ 0.0848  0.434  0.3489  411.67%    45  coq-mathcomp-analysis/theories/gauss_integral.v.html                                             │
│   30.9   31.2  0.3452    1.12%   139  coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html             │
│   46.4   46.7  0.3289    0.71%   115  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/full_mul.v.html     │
│   11.2   11.5  0.3204    2.87%   675  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                             │
│   6.95   7.26  0.3093    4.45%   484  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                       │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
🐇 Top 25 speed ups
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                              TOP 25 SPEED UPS                                                              │
│                                                                                                                                            │
│  OLD     NEW     DIFF     %DIFF    Ln                     FILE                                                                             │
├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│  7.76    0.757  -7.0062  -90.25%   602  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Limits/Examples/StructureEnrichedLimits.v.html     │
│  7.41    0.776  -6.6388  -89.53%   604  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Colimits/Examples/StructureEnrichedColimits.v.html │
│  11.0     4.46  -6.5456  -59.45%   194  coq-fiat-crypto-with-bedrock/src/Fancy/Barrett256.v.html                                           │
│  55.5     49.6  -5.9754  -10.76%    27  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ToFancyWithCasts.v.html                           │
│  35.3     29.5  -5.7760  -16.36%   835  coq-fiat-crypto-with-bedrock/src/Fancy/Compiler.v.html                                             │
│   242      236  -5.4129   -2.24%   141  coq-fiat-crypto-with-bedrock/src/UnsaturatedSolinasHeuristics/Tests.v.html                         │
│   107      102  -4.7003   -4.40%    22  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html                             │
│  80.6     77.4  -3.2654   -4.05%    20  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/NBE.v.html                                        │
│   136      133  -2.8410   -2.09%   155  coq-fiat-crypto-with-bedrock/src/UnsaturatedSolinasHeuristics/Tests.v.html                         │
│  4.00     1.54  -2.4633  -61.55%   199  coq-fiat-crypto-with-bedrock/src/Fancy/Montgomery256.v.html                                        │
│  4.30     1.83  -2.4618  -57.31%   905  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                               │
│  3.49     1.11  -2.3735  -68.07%   112  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/cswap.v.html          │
│  20.5     18.7  -1.8220   -8.88%    24  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/MultiRetSplit.v.html                              │
│  1.93    0.119  -1.8066  -93.82%   216  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Constructions/Product.v.html                      │
│  4.87     3.12  -1.7524  -35.99%    19  coq-fiat-crypto-with-bedrock/src/Language/IdentifiersBasicGENERATED.v.html                         │
│  2.80     1.20  -1.5971  -57.04%   256  coq-fiat-crypto-with-bedrock/src/Fancy/Barrett256.v.html                                           │
│  1.53  0.00404  -1.5264  -99.74%   368  coq-unimath/UniMath/CategoryTheory/Monoidal/Examples/LiftPoset.v.html                              │
│  14.2     12.8  -1.4198  -10.00%    24  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/MulSplit.v.html                                   │
│  6.24     4.85  -1.3907  -22.27%    35  coq-fiat-crypto-with-bedrock/rupicola/src/Rupicola/Examples/Net/IPChecksum/IPChecksum.v.html       │
│  1.54    0.189  -1.3509  -87.71%  1325  coq-fiat-crypto-with-bedrock/src/Fancy/Compiler.v.html                                             │
│  1.35   0.0319  -1.3168  -97.64%   731  coq-fiat-crypto-with-bedrock/src/AbstractInterpretation/ZRangeProofs.v.html                        │
│  18.9     17.6  -1.2709   -6.73%    23  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/Arith.v.html                                      │
│  22.4     21.2  -1.2412   -5.54%    49  coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html                            │
│  1.03   0.0572  -0.9759  -94.46%   343  coq-fiat-crypto-with-bedrock/src/Assembly/EquivalenceProofs.v.html                                 │
│ 0.951  0.00427  -0.9470  -99.55%    64  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/Cartesian.v.html                         │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

@SkySkimmer

Copy link
Copy Markdown
Contributor

I think that's a bit faster. @Janno can you test that last commit on your stuff?

@Janno

Janno commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

Are the bench failures related to missing overlays or do I need to go in and investigate?

@SkySkimmer

Copy link
Copy Markdown
Contributor

@coqbot-app coqbot-app Bot removed the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Jun 3, 2026
@Janno

Janno commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

I think that's a bit faster. @Janno can you test that last commit on your stuff?

-0.43%, a step up from the previous -0.35%.

Comment thread test-suite/success/cbn.v
let v := eval cbn in (@difference set set_difference (exist _ 0 I) y) in
lazymatch v with
| difference (exist _ 0 I) y => exact I
| _ => fail "difference was not refolded"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what's going on in this test? in master it fails (cbn produces let (t2, _) := y in exist (fun _ : nat => True) 0 I)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(same for AsDef below)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These tests were extracted from failures on skylabs code where the refolding happens and is required. We are using something closer to 9.1. I will try to find out where the discrepancy comes from.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay, I know what happened. difference needs simpl nomatch and I lost that while minimizing the example. I pushed a commit to add the missing Arguments lines.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

does that mean we should add a test without the Arguments?
is a542012 still needed with the Arguments?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

does that mean we should add a test without the Arguments?

I guess we could keep a version of the tests without Arguments to be thorough. I don't really know how to decide. I generally do not like to assert that some ugly term is not being refolded (particularly because cbn can be very, very aggressive about refolding and that seems to be why people like using it)

is a542012 still needed with the Arguments?

Everything seems to work if I locally revert just the changes to cbn.ml from that commit.

@SkySkimmer SkySkimmer added the request: full CI Use this label when you want your next push to trigger a full CI. label Jun 3, 2026
@coqbot-app coqbot-app Bot removed the request: full CI Use this label when you want your next push to trigger a full CI. label Jun 3, 2026
@SkySkimmer

Copy link
Copy Markdown
Contributor

new commit: expand rel in mk_clos

This dramatically speeds up the tests in success/cbn2.v

For some reason it restores the master behaviour for some tests in success/cbn.v.
This should probably be investigated more as it may indicate a lurking bug.

@coqbot bench

@SkySkimmer

Copy link
Copy Markdown
Contributor

seems like subst_value doesn't like the eager expansion of rels

@coqbot-app coqbot-app Bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Jun 3, 2026
@SkySkimmer

Copy link
Copy Markdown
Contributor

@coqbot run full ci

@coqbot-app coqbot-app Bot removed the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Jun 3, 2026
@coqbot-app

coqbot-app Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🏁 Bench results:

┌─────────────────────────────────────┬─────────────────────────┬───────────────────────────────────────┬─────────────────────────┐
│                                     │      user time [s]      │           CPU instructions            │  max resident mem [KB]  │
│                                     │                         │                                       │                         │
│            package_name             │   NEW      OLD    PDIFF │      NEW             OLD        PDIFF │   NEW      OLD    PDIFF │
├─────────────────────────────────────┼─────────────────────────┼───────────────────────────────────────┼─────────────────────────┤
│                         coq-unimath │ 1855.82  1895.98  -2.12 │ 15387915403558  15730555061373  -2.18 │ 1797288  1730008   3.89 │
│                         rocq-stdlib │  413.99   422.19  -1.94 │  1508121533516   1508629520655  -0.03 │  759216   759096   0.02 │
│         coq-rewriter-perf-SuperFast │  460.57   465.07  -0.97 │  3616440313085   3651574093198  -0.96 │ 1258508  1232340   2.12 │
│                 rocq-mathcomp-field │  193.09   194.89  -0.92 │  1451561466765   1451429760031   0.01 │ 2290232  2290836  -0.03 │
│                       coq-fourcolor │ 1350.59  1362.69  -0.89 │ 12429292109396  12429378647563  -0.00 │ 1021900  1018060   0.38 │
│                            coq-corn │  635.85   641.27  -0.85 │  4329724778702   4329953492741  -0.01 │  617448   617124   0.05 │
│        coq-fiat-crypto-with-bedrock │ 7170.73  7230.66  -0.83 │ 59074554961171  59593224242966  -0.87 │ 2871568  2827052   1.57 │
│                 rocq-mathcomp-order │   81.06    81.64  -0.71 │   600833085125    600750272759   0.01 │ 1610752  1610112   0.04 │
│               coq-engine-bench-lite │  127.80   128.62  -0.64 │   954932468660    957494311801  -0.27 │ 1004580  1005780  -0.12 │
│                        coq-compcert │  304.35   306.16  -0.59 │  1998040223913   1998178419451  -0.01 │ 1203140  1203032   0.01 │
│                    coq-fiat-parsers │  271.97   273.40  -0.52 │  2091020723542   2090945941238   0.00 │ 2037104  2036112   0.05 │
│                        coq-rewriter │  329.36   330.99  -0.49 │  2440112510651   2457028840419  -0.69 │ 1411596  1401476   0.72 │
│          rocq-mathcomp-finite-group │   26.57    26.68  -0.41 │   172335252539    172287440983   0.03 │  568544   568492   0.01 │
│                   coq-iris-examples │  364.61   365.82  -0.33 │  2383258071163   2383481823102  -0.01 │ 1071948  1063696   0.78 │
│                           coq-color │  228.81   229.45  -0.28 │  1455580051225   1455431418456   0.01 │ 1159336  1162332  -0.26 │
│                      coq-verdi-raft │  489.96   491.09  -0.23 │  3401677660741   3401511538560   0.00 │  823412   826660  -0.39 │
│                    coq-math-classes │   82.07    82.24  -0.21 │   498221953723    498286904227  -0.01 │  514164   513948   0.04 │
│                         coq-coqutil │   47.19    47.28  -0.19 │   292045550521    292038457595   0.00 │  565460   565252   0.04 │
│                      coq-coquelicot │   38.85    38.91  -0.15 │   235035879179    235021256079   0.01 │  822924   822480   0.05 │
│                            coq-hott │  157.22   157.42  -0.13 │  1056816126077   1057820404972  -0.09 │  462144   460556   0.34 │
│                       coq-fiat-core │   55.25    55.32  -0.13 │   335033406625    335002584154   0.01 │  480192   479808   0.08 │
│                           coq-verdi │   43.11    43.16  -0.12 │   287674605686    287648952671   0.01 │  528976   523764   1.00 │
│          coq-performance-tests-lite │  882.34   883.27  -0.11 │  7066816351962   7104878799054  -0.54 │ 1558164  1494448   4.26 │
│                  rocq-mathcomp-boot │   39.38    39.34   0.10 │   232241921040    232176930818   0.03 │  658244   657820   0.06 │
│              rocq-mathcomp-solvable │   98.41    98.25   0.16 │   665911694958    665829587558   0.01 │ 1094780  1094704   0.01 │
│                        coq-coqprime │   56.66    56.52   0.25 │   393532270784    393517926083   0.00 │  818064   818004   0.01 │
│  rocq-mathcomp-group-representation │  104.10   103.81   0.28 │   729489544350    729365695259   0.02 │ 1705728  1705712   0.00 │
│               rocq-mathcomp-algebra │  392.80   391.65   0.29 │  2891871478470   2891796355852   0.00 │ 1590524  1588604   0.12 │
│                            coq-core │    2.74     2.73   0.37 │    18618894186     18611488589   0.04 │   90516    90708  -0.21 │
│               coq-mathcomp-analysis │ 1190.92  1186.00   0.41 │  8716575471540   8716347124770   0.00 │ 2079508  2081752  -0.11 │
│              coq-mathcomp-odd-order │  602.14   599.24   0.48 │  4276114492184   4275662301065   0.01 │ 2641596  2643320  -0.07 │
│                        rocq-bignums │   25.24    25.07   0.68 │   160381906120    160386491750  -0.00 │  460716   461228  -0.11 │
│ coq-neural-net-interp-computed-lite │  237.21   235.57   0.70 │  2263518624533   2263435172786   0.00 │  880676   881160  -0.05 │
│                        rocq-runtime │   76.21    75.58   0.83 │   551836799179    551272239996   0.10 │  495744   493948   0.36 │
│                           rocq-core │    6.85     6.78   1.03 │    41342996116     41357812919  -0.04 │  445436   444140   0.29 │
│                           rocq-elpi │   16.38    16.19   1.17 │   116684005725    116700889410  -0.01 │  450976   451260  -0.06 │
│             rocq-mathcomp-ssreflect │    1.21     1.13   7.08 │     7674175620      7678209689  -0.05 │  591932   591940  -0.00 │
└─────────────────────────────────────┴─────────────────────────┴───────────────────────────────────────┴─────────────────────────┘

INFO: failed to install
rocq-equations (in NEW)
coq-bedrock2 (in NEW)
coq-vst (in NEW)

rocq-metarocq-utils (dependency rocq-equations failed)
rocq-metarocq-common (dependency rocq-equations failed)
rocq-metarocq-template (dependency rocq-equations failed)
rocq-metarocq-pcuic (dependency rocq-equations failed)
rocq-metarocq-safechecker (dependency rocq-equations failed)
rocq-metarocq-erasure (dependency rocq-equations failed)
rocq-metarocq-translations (dependency rocq-equations failed)
coq-category-theory (dependency rocq-equations failed)

🐢 Top 25 slow downs
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                              TOP 25 SLOW DOWNS                                                              │
│                                                                                                                                             │
│   OLD     NEW    DIFF     %DIFF     Ln                     FILE                                                                             │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│    62.6   66.5  3.9663      6.34%   608  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html      │
│    50.6   52.1  1.4791      2.92%   567  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                         │
│     201    202  1.3903      0.69%     8  coq-neural-net-interp-computed-lite/theories/MaxOfTwoNumbersSimpler/Computed/AllLogits.v.html      │
│    58.5   59.7  1.2483      2.13%   659  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                              │
│    88.4   89.5  1.1074      1.25%   968  coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html                    │
│    88.2   89.3  1.0172      1.15%   999  coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html                    │
│    55.2   56.1  0.9503      1.72%   512  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                         │
│    54.3   55.2  0.9499      1.75%   296  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/Addchain.v.html                                 │
│    41.3   42.2  0.9418      2.28%   539  coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html                         │
│    43.6   44.5  0.8909      2.04%   256  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Jacobian.v.html                                      │
│    6.48   7.22  0.7412     11.44%  1831  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvFunctions.v.html   │
│    26.7   27.3  0.6140      2.30%    68  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/deps/riscv-coq/src/riscv/Proofs/VerifyDecode.v.html │
│    34.2   34.8  0.5535      1.62%   194  coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Jacobian.v.html                                      │
│    28.5   29.1  0.5427      1.90%   305  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/Addchain.v.html                                 │
│    30.6   31.1  0.5405      1.77%   596  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                              │
│   0.816   1.34  0.5264     64.52%   200  rocq-stdlib/theories/Numbers/HexadecimalNat.v.html                                                 │
│    21.1   21.6  0.4340      2.05%   616  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html                              │
│    48.8   49.2  0.4024      0.82%   376  coq-unimath/UniMath/ModelCategories/Generated/LNWFSMonoidalStructure.v.html                        │
│    32.1   32.5  0.3942      1.23%   121  coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html               │
│ 0.00297  0.395  0.3925  13196.87%    96  coq-mathcomp-analysis/theories/hoelder.v.html                                                      │
│ 0.00439  0.365  0.3609   8222.62%   254  coq-mathcomp-analysis/theories/measure_theory/measure_negligible.v.html                            │
│    33.7   34.1  0.3209      0.95%   898  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                               │
│    31.0   31.3  0.3160      1.02%   214  coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/Examples/p224_64_new.v.html               │
│   0.186  0.475  0.2890    155.06%    16  rocq-stdlib/theories/Numbers/DecimalPos.v.html                                                     │
│   0.367  0.651  0.2842     77.44%    59  rocq-stdlib/theories/ZArith/Zeuclid.v.html                                                         │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
🐇 Top 25 speed ups
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                              TOP 25 SPEED UPS                                                              │
│                                                                                                                                            │
│  OLD     NEW     DIFF     %DIFF    Ln                     FILE                                                                             │
├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│  7.71    0.768  -6.9445  -90.05%   602  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Limits/Examples/StructureEnrichedLimits.v.html     │
│  11.2     4.41  -6.8078  -60.71%   194  coq-fiat-crypto-with-bedrock/src/Fancy/Barrett256.v.html                                           │
│  7.49    0.767  -6.7197  -89.75%   604  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Colimits/Examples/StructureEnrichedColimits.v.html │
│  35.2     29.4  -5.7941  -16.44%   835  coq-fiat-crypto-with-bedrock/src/Fancy/Compiler.v.html                                             │
│  55.1     49.8  -5.2441   -9.52%    27  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ToFancyWithCasts.v.html                           │
│   107      103  -4.4546   -4.16%    22  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html                             │
│  80.9     77.3  -3.6311   -4.49%    20  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/NBE.v.html                                        │
│  3.99     1.53  -2.4584  -61.68%   199  coq-fiat-crypto-with-bedrock/src/Fancy/Montgomery256.v.html                                        │
│  4.28     1.83  -2.4477  -57.21%   905  coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html                               │
│  3.50     1.08  -2.4204  -69.08%   112  coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/cswap.v.html          │
│  1.93   0.0789  -1.8468  -95.90%   216  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Constructions/Product.v.html                      │
│  20.6     18.8  -1.8423   -8.93%    24  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/MultiRetSplit.v.html                              │
│  4.89     3.12  -1.7718  -36.24%    19  coq-fiat-crypto-with-bedrock/src/Language/IdentifiersBasicGENERATED.v.html                         │
│  6.38     4.73  -1.6452  -25.79%    35  coq-fiat-crypto-with-bedrock/rupicola/src/Rupicola/Examples/Net/IPChecksum/IPChecksum.v.html       │
│  2.83     1.23  -1.6013  -56.62%   256  coq-fiat-crypto-with-bedrock/src/Fancy/Barrett256.v.html                                           │
│  1.54  0.00404  -1.5324  -99.74%   368  coq-unimath/UniMath/CategoryTheory/Monoidal/Examples/LiftPoset.v.html                              │
│  14.2     12.7  -1.5202  -10.70%    24  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/MulSplit.v.html                                   │
│  1.55    0.162  -1.3880  -89.53%  1325  coq-fiat-crypto-with-bedrock/src/Fancy/Compiler.v.html                                             │
│  18.8     17.4  -1.3708   -7.30%    23  coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/Arith.v.html                                      │
│  1.35   0.0333  -1.3190  -97.54%   731  coq-fiat-crypto-with-bedrock/src/AbstractInterpretation/ZRangeProofs.v.html                        │
│  26.7     25.7  -1.0203   -3.82%    13  coq-fourcolor/theories/proof/job466to485.v.html                                                    │
│  6.34     5.36  -0.9878  -15.57%    20  coq-fiat-crypto-with-bedrock/src/Language/IdentifiersGENERATEDProofs.v.html                        │
│  1.03   0.0578  -0.9768  -94.41%   343  coq-fiat-crypto-with-bedrock/src/Assembly/EquivalenceProofs.v.html                                 │
│ 0.947  0.00406  -0.9430  -99.57%    64  coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/Cartesian.v.html                         │
│  1.12    0.190  -0.9329  -83.08%   833  coq-unimath/UniMath/CategoryTheory/EnrichedCats/Limits/Examples/StructureEnrichedLimits.v.html     │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

@coqbot-app coqbot-app Bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Jun 4, 2026

@Janno Janno left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I added a regression test for the metarocq failure. I also pushed a preliminary LLM-generated fix in 40b8b30. Not sure what to make of it, though. It will probably have a bit of a performance impact, I think.

Comment thread test-suite/success/cbn.v
let v := eval cbn in (@difference set set_difference (exist _ 0 I) y) in
lazymatch v with
| difference (exist _ 0 I) y => exact I
| _ => fail "difference was not refolded"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay, I know what happened. difference needs simpl nomatch and I lost that while minimizing the example. I pushed a commit to add the missing Arguments lines.

@SkySkimmer SkySkimmer added the kind: performance Improvements to performance and efficiency. label Jun 4, 2026
@SkySkimmer SkySkimmer added this to the 9.3+rc1 milestone Jun 4, 2026
@SkySkimmer SkySkimmer added the request: full CI Use this label when you want your next push to trigger a full CI. label Jun 5, 2026
@coqbot-app coqbot-app Bot removed request: full CI Use this label when you want your next push to trigger a full CI. needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. labels Jun 5, 2026
@SkySkimmer

Copy link
Copy Markdown
Contributor

@Janno can you check if what I pushed causes regressions?

@Janno

Janno commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

We just completed a bump to 9.2 so the results are not comparable to the previous results on 9.1. Still, -0.78% looks a lot like a huge improvement over the previous -0.43%. No errors.

@coqbot-app coqbot-app Bot added the needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. label Jun 15, 2026
@github-actions github-actions Bot added the needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. label Jun 15, 2026
@SkySkimmer SkySkimmer added the request: full CI Use this label when you want your next push to trigger a full CI. label Jun 16, 2026
@SkySkimmer

Copy link
Copy Markdown
Contributor

for less painful rebase I squashed

@SkySkimmer SkySkimmer force-pushed the janno/cbn-delayed-subst branch from 8aae8f9 to 291a8e5 Compare June 16, 2026 12:09
@coqbot-app coqbot-app Bot removed needs: rebase Should be rebased on the latest master to solve conflicts or have a newer CI run. request: full CI Use this label when you want your next push to trigger a full CI. needs: full CI The latest GitLab pipeline that ran was a light CI. Say "@coqbot run full ci" to get a full CI. labels Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind: performance Improvements to performance and efficiency.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants