Exit early from conversion in all cases that directly involve evars#21964
Exit early from conversion in all cases that directly involve evars#21964Janno wants to merge 2 commits into
Conversation
|
This is maybe correct when conversion is called from unification, but that's not the only way to call conversion from outside the kernel. |
|
Performance reports on our in-house proofs show an overall 0.25% performance improvement that is almost entirely contained within a single file. Our proofs tend to use evars as little as possible so I didn't expect anything huge. There are also a bunch of failures from ssreflect rewrite, I think. Probably not worth running a full bench here until I fix |
|
@coqbot run full ci |
|
@coqbot bench |
|
🏁 Bench results: INFO: failed to install rocq-mathcomp-boot (dependency rocq-elpi failed) 🐢 Top 25 slow downs┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TOP 25 SLOW DOWNS │ │ │ │ OLD NEW DIFF %DIFF Ln FILE │ ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 18.0 18.6 0.6233 3.47% 32 coq-performance-tests-lite/src/pattern.v.html │ │ 33.951 34.555 0.6040 1.78% 194 coq-vst/veric/expr_lemmas4.v.html │ │ 3.86 4.45 0.5986 15.52% 492 rocq-stdlib/theories/Reals/Cauchy/ConstructiveCauchyRealsMult.v.html │ │ 200 201 0.5815 0.29% 8 coq-neural-net-interp-computed-lite/theories/MaxOfTwoNumbersSimpler/Computed/AllLogits.v.html │ │ 35.101 35.629 0.5280 1.50% 147 coq-vst/veric/expr_lemmas4.v.html │ │ 0.193 0.694 0.5004 259.13% 586 rocq-stdlib/theories/Strings/Byte.v.html │ │ 17.9 18.3 0.4385 2.46% 31 coq-engine-bench-lite/coq/PerformanceDemos/pattern.v.html │ │ 1.9 2.324 0.4240 22.32% 243 coq-vst/floyd/subsume_funspec.v.html │ │ 0.646 1.06 0.4177 64.70% 816 rocq-stdlib/theories/MSets/MSetRBT.v.html │ │ 2.05 2.43 0.3785 18.46% 212 rocq-stdlib/theories/setoid_ring/Ncring_tac.v.html │ │ 0.689 1.06 0.3725 54.07% 214 rocq-stdlib/theories/setoid_ring/Ncring_tac.v.html │ │ 3.91 4.27 0.3613 9.24% 196 rocq-stdlib/theories/ZArith/ZModOffset.v.html │ │ 0.841 1.19 0.3494 41.52% 408 rocq-stdlib/theories/MSets/MSetAVL.v.html │ │ 0.244 0.512 0.2676 109.70% 11 rocq-stdlib/theories/omega/PreOmega.v.html │ │ 0.445 0.684 0.2393 53.77% 83 rocq-stdlib/theories/Numbers/Cyclic/Int63/Sint63.v.html │ │ 15.532 15.761 0.2290 1.47% 1209 coq-vst/floyd/Component.v.html │ │ 0.221 0.444 0.2230 100.76% 374 rocq-stdlib/theories/Sorting/SetoidList.v.html │ │ 0.305 0.520 0.2156 70.75% 14 rocq-stdlib/theories/ZArith/auxiliary.v.html │ │ 0.248 0.461 0.2130 85.93% 1166 rocq-stdlib/theories/Strings/Byte.v.html │ │ 40.351 40.563 0.2120 0.53% 834 coq-vst/veric/binop_lemmas4.v.html │ │ 0.313 0.519 0.2065 66.07% 11 rocq-stdlib/theories/ZArith/Zpow_alt.v.html │ │ 0.299 0.496 0.1970 65.86% 11 rocq-stdlib/theories/ZArith/Zbool.v.html │ │ 0.320 0.510 0.1906 59.67% 484 rocq-stdlib/theories/Numbers/HexadecimalFacts.v.html │ │ 0.0713 0.260 0.1891 265.15% 84 rocq-stdlib/theories/Vectors/Vector.v.html │ │ 0.326 0.512 0.1869 57.42% 13 rocq-stdlib/theories/micromega/ZifyNat.v.html │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ 🐇 Top 25 speed ups┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TOP 25 SPEED UPS │ │ │ │ OLD NEW DIFF %DIFF Ln FILE │ ├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 3.813 0.252 -3.5610 -93.39% 241 coq-vst/floyd/subsume_funspec.v.html │ │ 2.227 0.005 -2.2220 -99.78% 1496 coq-vst/floyd/SeparationLogicAsLogic.v.html │ │ 0.825 0. -0.8250 -100.00% 847 coq-vst/veric/SeparationLogic.v.html │ │ 0.507 0.022 -0.4850 -95.66% 777 coq-vst/floyd/Component.v.html │ │ 0.887 0.407 -0.4804 -54.15% 682 rocq-stdlib/theories/Numbers/DecimalFacts.v.html │ │ 94.6 94.1 -0.4438 -0.47% 999 coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html │ │ 0.808 0.418 -0.3893 -48.20% 141 rocq-stdlib/theories/Strings/Ascii.v.html │ │ 0.347 0. -0.3470 -100.00% 853 coq-vst/veric/SeparationLogic.v.html │ │ 0.257 0. -0.2570 -100.00% 857 coq-vst/veric/SeparationLogic.v.html │ │ 0.565 0.324 -0.2413 -42.72% 1 rocq-stdlib/theories/ZArith/ZModOffset.v.html │ │ 0.474 0.245 -0.2298 -48.44% 11 rocq-stdlib/theories/micromega/Zify.v.html │ │ 0.394 0.180 -0.2140 -54.26% 14 rocq-stdlib/theories/ZArith/Znat.v.html │ │ 0.497 0.293 -0.2039 -41.05% 16 rocq-stdlib/theories/extraction/ExtrOcamlIntConv.v.html │ │ 0.579 0.385 -0.1937 -33.48% 596 rocq-stdlib/theories/Strings/Byte.v.html │ │ 0.521 0.342 -0.1790 -34.36% 19 rocq-stdlib/theories/ZArith/Int.v.html │ │ 0.497 0.322 -0.1749 -35.18% 11 rocq-stdlib/theories/micromega/ZifyComparison.v.html │ │ 0.537 0.368 -0.1694 -31.53% 13 rocq-stdlib/theories/ZArith/Zmin.v.html │ │ 0.444 0.277 -0.1674 -37.66% 11 rocq-stdlib/theories/QArith/Qround.v.html │ │ 0.165 0.001 -0.1640 -99.39% 781 coq-vst/floyd/Component.v.html │ │ 22.0 21.9 -0.1584 -0.72% 651 rocq-stdlib/theories/Zmod/ZmodBase.v.html │ │ 0.405 0.254 -0.1506 -37.19% 11 rocq-stdlib/theories/omega/OmegaLemmas.v.html │ │ 0.266 0.120 -0.1465 -55.07% 23 rocq-stdlib/theories/Sorting/Sorted.v.html │ │ 0.272 0.128 -0.1437 -52.90% 16 rocq-stdlib/theories/Numbers/NaryFunctions.v.html │ │ 0.498 0.357 -0.1413 -28.36% 15 rocq-stdlib/theories/micromega/ZifyInst.v.html │ │ 0.476 0.335 -0.1412 -29.65% 1982 rocq-stdlib/theories/FSets/FMapFacts.v.html │ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ |
b527554 to
f43ed06
Compare
|
I rebased my commits. Maybe that will fix things. |
|
@coqbot run full ci |
|
@coqbot bench |
|
The failure in corn is from this piece of code in If I change Now I wonder if the interface I picked is too restrictive. Callers like this need to distinguish between I am not sure how to bubble up the this specific kind of failure through |
|
🏁 Bench results: INFO: failed to install rocq-mathcomp-algebra (dependency rocq-mathcomp-fingroup failed) 🐢 Top 25 slow downs┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TOP 25 SLOW DOWNS │ │ │ │ OLD NEW DIFF %DIFF Ln FILE │ ├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 21.5 22.7 1.2156 5.66% 49 coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html │ │ 44.4 45.6 1.1888 2.68% 3 coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/WithBedrock/fiat_crypto.v.html │ │ 42.2 43.3 1.1252 2.67% 2 coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/fiat_crypto.v.html │ │ 107 108 0.9995 0.94% 22 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html │ │ 64.1 65.0 0.9189 1.43% 608 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html │ │ 44.1 45.0 0.8204 1.86% 3 coq-fiat-crypto-with-bedrock/src/ExtractionJsOfOCaml/bedrock2_fiat_crypto.v.html │ │ 46.0 46.6 0.5827 1.27% 115 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/full_mul.v.html │ │ 0.175 0.687 0.5121 293.04% 586 rocq-stdlib/theories/Strings/Byte.v.html │ │ 33.4 33.9 0.5119 1.53% 898 coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html │ │ 0.237 0.729 0.4914 206.89% 11 rocq-stdlib/theories/ZArith/Zpow_alt.v.html │ │ 0.241 0.707 0.4663 193.48% 17 rocq-stdlib/theories/micromega/Env.v.html │ │ 3.78 4.25 0.4643 12.28% 492 rocq-stdlib/theories/Reals/Cauchy/ConstructiveCauchyRealsMult.v.html │ │ 9.87 10.3 0.4502 4.56% 326 coq-fiat-crypto-with-bedrock/src/Fancy/Barrett256.v.html │ │ 36.5 36.9 0.4098 1.12% 139 coq-fiat-parsers/src/Parsers/Refinement/SharpenedJSON.v.html │ │ 14.8 15.2 0.4001 2.71% 841 coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/Jacobian/CoZ.v.html │ │ 7.81 8.20 0.3878 4.96% 1831 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvFunctions.v.html │ │ 10.9 11.3 0.3829 3.52% 158 coq-fiat-crypto-with-bedrock/src/Bedrock/P256.v.html │ │ 25.3 25.7 0.3818 1.51% 788 coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JoyeLadder.v.html │ │ 0.0753 0.453 0.3773 501.21% 22 rocq-stdlib/theories/Vectors/VectorEq.v.html │ │ 0.138 0.511 0.3732 269.85% 270 coq-fiat-crypto-with-bedrock/src/Curves/Montgomery/XZProofs.v.html │ │ 9.58 9.95 0.3640 3.80% 304 coq-fiat-crypto-with-bedrock/src/Fancy/Montgomery256.v.html │ │ 18.0 18.4 0.3577 1.98% 31 coq-engine-bench-lite/coq/PerformanceDemos/pattern.v.html │ │ 2.30 2.63 0.3217 13.96% 212 rocq-stdlib/theories/setoid_ring/Ncring_tac.v.html │ │ 21.6 21.9 0.3216 1.49% 651 rocq-stdlib/theories/Zmod/ZmodBase.v.html │ │ 0.413 0.733 0.3201 77.52% 16 rocq-stdlib/theories/extraction/ExtrOcamlIntConv.v.html │ └────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ 🐇 Top 25 speed ups┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TOP 25 SPEED UPS │ │ │ │ OLD NEW DIFF %DIFF Ln FILE │ ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 202 200 -1.9712 -0.97% 8 coq-neural-net-interp-computed-lite/theories/MaxOfTwoNumbersSimpler/Computed/AllLogits.v.html │ │ 45.3 43.4 -1.8901 -4.17% 578 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/MMIO.v.html │ │ 94.4 92.5 -1.8225 -1.93% 999 coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html │ │ 94.2 92.7 -1.5958 -1.69% 968 coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html │ │ 238 237 -1.1433 -0.48% 141 coq-fiat-crypto-with-bedrock/src/UnsaturatedSolinasHeuristics/Tests.v.html │ │ 25.3 24.4 -0.9728 -3.84% 550 coq-bedrock2/bedrock2/src/bedrock2Examples/insertionsort.v.html │ │ 134 133 -0.9207 -0.69% 155 coq-fiat-crypto-with-bedrock/src/UnsaturatedSolinasHeuristics/Tests.v.html │ │ 0.788 0.0398 -0.7481 -94.95% 656 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvCommon.v.html │ │ 0.781 0.0398 -0.7413 -94.91% 605 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvCommon.v.html │ │ 3.92 3.18 -0.7398 -18.88% 130 coq-category-theory/Functor/Strong/Product.v.html │ │ 54.6 54.0 -0.5627 -1.03% 296 coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/Addchain.v.html │ │ 51.6 51.1 -0.5570 -1.08% 571 coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/EdwardsXYZT.v.html │ │ 1.54 1.02 -0.5257 -34.07% 572 rocq-stdlib/theories/MSets/MSetAVL.v.html │ │ 39.6 39.2 -0.4658 -1.18% 1423 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/compiler/src/compiler/FlatToRiscvFunctions.v.html │ │ 18.6 18.1 -0.4550 -2.45% 32 coq-performance-tests-lite/src/pattern.v.html │ │ 0.724 0.276 -0.4486 -61.94% 18 rocq-stdlib/theories/ZArith/Zeven.v.html │ │ 36.3 35.8 -0.4294 -1.18% 195 coq-fiat-crypto-with-bedrock/src/Bedrock/P256/Jacobian.v.html │ │ 2.41 2.00 -0.4112 -17.05% 142 rocq-metarocq-pcuic/pcuic/theories/PCUICContextConversion.v.html │ │ 38.5 38.1 -0.4049 -1.05% 224 coq-performance-tests-lite/PerformanceExperiments/rewrite_lift_lets_map.v.html │ │ 0.730 0.331 -0.3985 -54.63% 760 rocq-stdlib/theories/setoid_ring/Ring_polynom.v.html │ │ 30.5 30.2 -0.3855 -1.26% 305 coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/Addchain.v.html │ │ 81.3 80.9 -0.3720 -0.46% 20 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/NBE.v.html │ │ 1.03 0.670 -0.3607 -34.99% 597 rocq-stdlib/theories/Strings/Byte.v.html │ │ 17.3 16.9 -0.3405 -1.97% 669 coq-fiat-crypto-with-bedrock/src/Bedrock/Secp256k1/JacobianCoZ.v.html │ │ 0.452 0.138 -0.3143 -69.55% 20 rocq-stdlib/theories/Vectors/Bvector.v.html │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ |
|
🔴 CI failures at commit f43ed06 without any failure in the test-suite ✔️ Corresponding jobs for the base commit af3cabc succeeded ❔ Ask me to try to extract minimal test cases that can be added to the test-suite 🏃
|
Context: #Rocq users > Another situation where Rocq's type-checker diverges
Fixes / closes #????
make doc_gram_rsts.