New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[unification] Experiment: add a flag to configure conversion on heads found by FO approximation #18939
base: master
Are you sure you want to change the base?
Conversation
…ad terms found by first-order approximation.
@coqbot run full ci |
@coqbot bench |
The default value of the flag is true, so IIANM this PR is the identity. |
I guess it's been a while since we saw how much noise the bench has in a reflexive test |
🏁 Bench results:
INFO: failed to install coq-mathcomp-fingroup (dependency coq-mathcomp-ssreflect failed) 🐢 Top 25 slow downs┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TOP 25 SLOW DOWNS │ │ │ │ OLD NEW DIFF %DIFF Ln FILE │ ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 152.5250 154.9280 2.4030 1.58% 1190 coq-unimath/UniMath/CategoryTheory/GrothendieckConstruction/IsPullback.v.html │ │ 99.1470 100.9060 1.7590 1.77% 20 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/NBE.v.html │ │ 219.6550 221.2410 1.5860 0.72% 103 coq-fiat-crypto-with-bedrock/src/Arithmetic/BarrettReduction.v.html │ │ 18.5540 19.6090 1.0550 5.69% 957 coq-unimath/UniMath/CategoryTheory/Monoidal/Examples/DisplayedCartesianMonoidal.v.html │ │ 3.9330 4.9540 1.0210 25.96% 22 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html │ │ 95.0340 96.0100 0.9760 1.03% 968 coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html │ │ 65.5550 66.4840 0.9290 1.42% 27 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ToFancyWithCasts.v.html │ │ 46.0770 46.9970 0.9200 2.00% 110 coq-bedrock2/bedrock2/src/bedrock2Examples/full_mul.v.html │ │ 46.0940 46.9890 0.8950 1.94% 110 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/full_mul.v.html │ │ 96.4860 97.3630 0.8770 0.91% 376 coq-unimath/UniMath/ModelCategories/Generated/LNWFSMonoidalStructure.v.html │ │ 46.9650 47.6880 0.7230 1.54% 926 coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/GarageDoor.v.html │ │ 95.2110 95.9040 0.6930 0.73% 999 coq-performance-tests-lite/src/fiat_crypto_via_setoid_rewrite_standalone.v.html │ │ 2.6710 3.3260 0.6550 24.52% 34 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html │ │ 43.1210 43.7710 0.6500 1.51% 827 coq-vst/veric/binop_lemmas4.v.html │ │ 7.8460 8.4890 0.6430 8.20% 1225 coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/Reindexing.v.html │ │ 26.8000 27.3960 0.5960 2.22% 68 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/deps/riscv-coq/src/riscv/Proofs/VerifyDecode.v.html │ │ 2.0180 2.5980 0.5800 28.74% 32 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/NBE.v.html │ │ 33.3750 33.9520 0.5770 1.73% 839 coq-unimath/UniMath/CategoryTheory/GrothendieckConstruction/IsPullback.v.html │ │ 61.5060 62.0590 0.5530 0.90% 609 coq-fiat-crypto-with-bedrock/rupicola/bedrock2/bedrock2/src/bedrock2Examples/lightbulb.v.html │ │ 23.7250 24.2410 0.5160 2.17% 49 coq-fiat-crypto-with-bedrock/src/Curves/Weierstrass/AffineProofs.v.html │ │ 1.6390 2.1260 0.4870 29.71% 42 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ToFancyWithCasts.v.html │ │ 47.2770 47.7560 0.4790 1.01% 558 coq-bedrock2/bedrock2/src/bedrock2Examples/insertionsort.v.html │ │ 72.8240 73.2820 0.4580 0.63% 905 coq-unimath/UniMath/ModelCategories/Generated/LNWFSCocomplete.v.html │ │ 26.8380 27.2890 0.4510 1.68% 147 coq-fiat-crypto-with-bedrock/src/Bedrock/End2End/X25519/GarageDoorTop.v.html │ │ 41.1310 41.5670 0.4360 1.06% 139 coq-fiat-parsers/src/Parsers/Refinement/SharpenedJSON.v.html │ └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ 🐇 Top 25 speed ups┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ │ TOP 25 SPEED UPS │ │ │ │ OLD NEW DIFF %DIFF Ln FILE │ ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │ 257.7610 248.1680 -9.5930 -3.72% 8 coq-neural-net-interp-computed-lite/theories/MaxOfTwoNumbersSimpler/Computed/AllLogits.v.html │ │ 27.7200 26.8000 -0.9200 -3.32% 373 coq-unimath/UniMath/CategoryTheory/GrothendieckConstruction/IsPullback.v.html │ │ 23.3890 22.7730 -0.6160 -2.63% 595 coq-unimath/UniMath/CategoryTheory/GrothendieckConstruction/IsPullback.v.html │ │ 9.5210 9.0110 -0.5100 -5.36% 952 coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/StrictTwoSidedDispCat.v.html │ │ 2.7480 2.4120 -0.3360 -12.23% 487 coq-stdlib/Numbers/HexadecimalFacts.v.html │ │ 5.4660 5.1400 -0.3260 -5.96% 1099 coq-unimath/UniMath/CategoryTheory/DisplayedCats/Examples/StrictTwoSidedDispCat.v.html │ │ 6.8920 6.6320 -0.2600 -3.77% 604 coq-unimath/UniMath/CategoryTheory/EnrichedCats/Colimits/Examples/StructureEnrichedColimits.v.html │ │ 10.4460 10.1920 -0.2540 -2.43% 496 coq-rewriter/src/Rewriter/Rewriter/Wf.v.html │ │ 0.2430 0.0000 -0.2430 -100.00% 474 coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Synthesis/New/Signature.v.html │ │ 0.2410 0.0000 -0.2410 -100.00% 65 coq-fiat-crypto-with-bedrock/src/Bedrock/Standalone/StandaloneOCamlMain.v.html │ │ 133.1920 132.9750 -0.2170 -0.16% 22 coq-fiat-crypto-with-bedrock/src/Rewriter/Passes/ArithWithCasts.v.html │ │ 0.2080 0.0000 -0.2080 -100.00% 241 coq-metacoq-erasure/erasure/theories/ErasureProperties.v.html │ │ 0.2050 0.0040 -0.2010 -98.05% 232 coq-fiat-crypto-with-bedrock/src/Bedrock/Field/Translation/Proofs/Cmd.v.html │ │ 0.1950 0.0010 -0.1940 -99.49% 374 coq-metacoq-erasure/erasure/theories/EGenericGlobalMap.v.html │ │ 0.1910 0.0000 -0.1910 -100.00% 106 coq-metacoq-pcuic/pcuic/theories/PCUICSpine.v.html │ │ 12.5640 12.3750 -0.1890 -1.50% 409 coq-category-theory/Theory/Metacategory/ArrowsOnly.v.html │ │ 1.9210 1.7380 -0.1830 -9.53% 373 coq-bedrock2/bedrock2/src/bedrock2Examples/memmove.v.html │ │ 0.1830 0.0020 -0.1810 -98.91% 150 coq-metacoq-pcuic/pcuic/theories/PCUICContextReduction.v.html │ │ 14.8960 14.7170 -0.1790 -1.20% 99 coq-fiat-crypto-with-bedrock/src/Spec/Curve25519.v.html │ │ 0.1760 0.0030 -0.1730 -98.30% 122 coq-metacoq-pcuic/pcuic/theories/Typing/PCUICRenameTyp.v.html │ │ 0.1730 0.0010 -0.1720 -99.42% 764 coq-metacoq-pcuic/pcuic/theories/PCUICReduction.v.html │ │ 4.6330 4.4610 -0.1720 -3.71% 5 coq-fiat-crypto-with-bedrock/src/Assembly/Parse/Examples/fiat_p256_square_optimised_seed103.v.html │ │ 15.4720 15.3060 -0.1660 -1.07% 417 coq-fiat-crypto-with-bedrock/src/Bedrock/Group/ScalarMult/MontgomeryLadder.v.html │ │ 0.4890 0.3250 -0.1640 -33.54% 868 coq-stdlib/MSets/MSetRBT.v.html │ │ 9.9650 9.8010 -0.1640 -1.65% 418 coq-category-theory/Theory/Metacategory/ArrowsOnly.v.html │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ |
One can then disallow conversion on the heads (not the arguments) for much faster unification.
This is too crude to use directly, hence just a draft at this point.
Fixes / closes #????
make doc_gram_rsts
.