Skip to content

Conversation

@SeungheonOh
Copy link
Collaborator

Adds "application through case/constr" optimization. Pretty decent free optimizations.

It is also possible to turn programs like

[(lam x [(lam y [(lam z z) (con integer 1)]) (con integer 2)]) (con integer 3)]

into

(case (constr 0 (con integer 1) (con integer 2) (con integer 3)) (lam x (lam y (lam z))))

But this is only possible when the body of inner lambda doesn't reference variable bounded by all previous lambda abstractions. Maybe this is easier to do on PIR side.

@SeungheonOh SeungheonOh force-pushed the sho/applyOptimization branch from 47a0318 to b8810a2 Compare November 17, 2025 21:04
@SeungheonOh
Copy link
Collaborator Author

budget changes

plutus-benchmark/bitwise/test/9.6/8

Metric Old New Δ%
CPU 690_504_274_054 676_514_370_054 -2.03%
Memory 2_426_715_423 2_339_278_523 -3.60%
Flat Size 390 396 +1.54%

plutus-benchmark/bitwise/test/9.6/Ed25519.golden.eval

Metric Old New Δ%
CPU 1_628_853_751_874 1_600_997_655_874 -1.71%
Memory 4_738_061_878 4_563_961_278 -3.67%
Flat Size 5_265 5_409 +2.74%

plutus-benchmark/cardano-loans/test/9.6/main.golden.eval

Metric Old New Δ%
CPU 110_908_889 103_196_889 -6.95%
Memory 621_150 572_950 -7.76%
Flat Size 8_699 8_737 +0.44%

plutus-benchmark/coop/test/9.6/authMpBurning.golden.eval

Metric Old New Δ%
CPU 160_613_384 160_437_384 -0.11%
Memory 799_466 798_366 -0.14%

plutus-benchmark/coop/test/9.6/authMpMinting.golden.eval

Metric Old New Δ%
CPU 369_713_157 369_521_157 -0.05%
Memory 1_849_456 1_848_256 -0.06%

plutus-benchmark/coop/test/9.6/certMpBurning.golden.eval

Metric Old New Δ%
CPU 1_842_342_144 1_837_078_144 -0.29%
Memory 10_767_218 10_734_318 -0.31%
Flat Size 8_041 8_070 +0.36%

plutus-benchmark/coop/test/9.6/certMpMinting.golden.eval

Metric Old New Δ%
CPU 400_086_379 399_462_379 -0.16%
Memory 2_025_456 2_021_556 -0.19%
Flat Size 8_564 8_593 +0.34%

plutus-benchmark/coop/test/9.6/fsMpBurning.golden.eval

Metric Old New Δ%
CPU 221_694_924 221_086_924 -0.27%
Memory 1_160_575 1_156_775 -0.33%
Flat Size 7_405 7_440 +0.47%

plutus-benchmark/coop/test/9.6/fsMpMinting.golden.eval

Metric Old New Δ%
CPU 568_150_641 565_494_641 -0.47%
Memory 3_047_567 3_030_967 -0.54%
Flat Size 9_223 9_258 +0.38%

plutus-benchmark/coop/test/9.6/mustBurnOwnSingleton.golden.eval

Metric Old New Δ%
CPU 114_113_035 113_841_035 -0.24%
Memory 579_805 578_105 -0.29%
Flat Size 3_833 3_837 +0.10%

plutus-benchmark/linear-vesting/test/9.6/main.golden.eval

Metric Old New Δ%
CPU 30_837_131 30_133_131 -2.28%
Memory 131_619 127_219 -3.34%
Flat Size 2_860 2_885 +0.87%

plutus-benchmark/lists/test/Lookup/9.6/match-builtin-list-10.golden.eval

Metric Old New Δ%
CPU 66_825_610 65_033_610 -2.68%
Memory 312_530 301_330 -3.58%
Flat Size 170 173 +1.76%

plutus-benchmark/lists/test/Lookup/9.6/match-builtin-list-100.golden.eval

Metric Old New Δ%
CPU 5_789_660_200 5_628_028_200 -2.79%
Memory 26_523_500 25_513_300 -3.81%
Flat Size 753 756 +0.40%

plutus-benchmark/lists/test/Lookup/9.6/match-builtin-list-5.golden.eval

Metric Old New Δ%
CPU 19_422_330 18_910_330 -2.64%
Memory 92_790 89_590 -3.45%
Flat Size 148 151 +2.03%

plutus-benchmark/lists/test/Lookup/9.6/match-builtin-list-50.golden.eval

Metric Old New Δ%
CPU 1_471_225_650 1_430_393_650 -2.78%
Memory 6_755_850 6_500_650 -3.78%
Flat Size 369 372 +0.81%

plutus-benchmark/lists/test/Lookup/9.6/match-scott-list-10.golden.eval

Metric Old New Δ%
CPU 72_851_410 72_499_410 -0.48%
Memory 344_550 342_350 -0.64%
Flat Size 308 310 +0.65%

plutus-benchmark/lists/test/Lookup/9.6/match-scott-list-100.golden.eval

Metric Old New Δ%
CPU 5_849_918_200 5_846_686_200 -0.06%
Memory 26_843_700 26_823_500 -0.08%
Flat Size 1_970 1_972 +0.10%

plutus-benchmark/lists/test/Lookup/9.6/match-scott-list-5.golden.eval

Metric Old New Δ%
CPU 22_435_230 22_243_230 -0.86%
Memory 108_800 107_600 -1.10%
Flat Size 225 226 +0.44%

plutus-benchmark/lists/test/Lookup/9.6/match-scott-list-50.golden.eval

Metric Old New Δ%
CPU 1_501_354_650 1_499_722_650 -0.11%
Memory 6_915_950 6_905_750 -0.15%
Flat Size 986 988 +0.20%

plutus-benchmark/lists/test/Sum/9.6/left-fold-built-in.golden.eval

Metric Old New Δ%
CPU 63_416_900 61_800_900 -2.55%
Memory 333_400 323_300 -3.03%
Flat Size 207 210 +1.45%

plutus-benchmark/lists/test/Sum/9.6/left-fold-data.golden.eval

Metric Old New Δ%
CPU 165_524_496 155_828_496 -5.86%
Memory 778_865 718_265 -7.78%
Flat Size 701 704 +0.43%

plutus-benchmark/lists/test/Sum/9.6/left-fold-scott.golden.eval

Metric Old New Δ%
CPU 66_616_900 65_000_900 -2.43%
Memory 353_400 343_300 -2.86%
Flat Size 507 510 +0.59%

plutus-benchmark/lists/test/Sum/9.6/right-fold-built-in.golden.eval

Metric Old New Δ%
CPU 68_216_900 66_600_900 -2.37%
Memory 363_400 353_300 -2.78%
Flat Size 210 212 +0.95%

plutus-benchmark/lists/test/Sum/9.6/right-fold-data.golden.eval

Metric Old New Δ%
CPU 170_324_496 160_628_496 -5.69%
Memory 808_865 748_265 -7.49%
Flat Size 704 706 +0.28%

plutus-benchmark/lists/test/Sum/9.6/right-fold-scott.golden.eval

Metric Old New Δ%
CPU 71_416_900 69_800_900 -2.26%
Memory 383_400 373_300 -2.63%
Flat Size 510 512 +0.39%

plutus-benchmark/nofib/test/9.6/clausify-F5.golden.eval

Metric Old New Δ%
CPU 42_701_722_450 42_414_202_450 -0.67%
Memory 259_362_190 257_565_190 -0.69%
Flat Size 1_477 1_510 +2.23%

plutus-benchmark/nofib/test/9.6/knights10-4x4.golden.eval

Metric Old New Δ%
CPU 1_023_470_754 1_010_414_754 -1.28%
Memory 5_395_058 5_313_458 -1.51%
Flat Size 1_674 1_712 +2.27%

plutus-benchmark/nofib/test/9.6/queens4-bt.golden.eval

Metric Old New Δ%
CPU 3_363_965_578 3_349_373_578 -0.43%
Memory 18_709_269 18_618_069 -0.49%
Flat Size 1_764 1_782 +1.02%

plutus-benchmark/nofib/test/9.6/queens5-fc.golden.eval

Metric Old New Δ%
CPU 119_023_989_782 117_665_877_782 -1.14%
Memory 693_842_855 685_354_655 -1.22%
Flat Size 1_764 1_782 +1.02%

plutus-benchmark/script-contexts/test/V1/9.6/checkScriptContext1-20.golden.eval

Metric Old New Δ%
Flat Size 1_465 1_467 +0.14%

plutus-benchmark/script-contexts/test/V1/9.6/checkScriptContext1-4.golden.eval

Metric Old New Δ%
Flat Size 1_079 1_081 +0.19%

plutus-benchmark/script-contexts/test/V1/9.6/checkScriptContext2-20.golden.eval

Metric Old New Δ%
Flat Size 1_390 1_393 +0.22%

plutus-benchmark/script-contexts/test/V1/9.6/checkScriptContext2-4.golden.eval

Metric Old New Δ%
Flat Size 1_004 1_007 +0.30%

plutus-benchmark/script-contexts/test/V2/9.6/checkScriptContext1-20.golden.eval

Metric Old New Δ%
CPU 124_328_253 124_152_253 -0.14%
Memory 606_806 605_706 -0.18%

plutus-benchmark/script-contexts/test/V2/9.6/checkScriptContext1-4.golden.eval

Metric Old New Δ%
CPU 36_906_589 36_730_589 -0.48%
Memory 177_398 176_298 -0.62%

plutus-benchmark/script-contexts/test/V2/9.6/checkScriptContext2-20.golden.eval

Metric Old New Δ%
CPU 117_015_830 116_839_830 -0.15%
Memory 574_864 573_764 -0.19%
Flat Size 1_499 1_500 +0.07%

plutus-benchmark/script-contexts/test/V2/9.6/checkScriptContext2-4.golden.eval

Metric Old New Δ%
CPU 34_797_494 34_621_494 -0.51%
Memory 167_888 166_788 -0.66%
Flat Size 1_065 1_066 +0.09%

plutus-benchmark/script-contexts/test/V2/9.6/sopFwdStakeTrick.golden.eval

Metric Old New Δ%
CPU 145_894_198 145_718_198 -0.12%
Memory 724_058 722_958 -0.15%
Flat Size 2_145 2_146 +0.05%

plutus-benchmark/script-contexts/test/V3/9.6/checkScriptContext1-20.golden.eval

Metric Old New Δ%
CPU 126_102_096 126_054_096 -0.04%
Memory 612_722 612_422 -0.05%
Flat Size 2_365 2_373 +0.34%

plutus-benchmark/script-contexts/test/V3/9.6/checkScriptContext1-4.golden.eval

Metric Old New Δ%
CPU 39_448_432 39_400_432 -0.12%
Memory 188_114 187_814 -0.16%
Flat Size 1_931 1_939 +0.41%

plutus-benchmark/script-contexts/test/V3/9.6/checkScriptContext2-20.golden.eval

Metric Old New Δ%
CPU 118_709_673 118_661_673 -0.04%
Memory 580_280 579_980 -0.05%
Flat Size 2_287 2_294 +0.31%

plutus-benchmark/script-contexts/test/V3/9.6/checkScriptContext2-4.golden.eval

Metric Old New Δ%
CPU 37_259_337 37_211_337 -0.13%
Memory 178_104 177_804 -0.17%
Flat Size 1_853 1_860 +0.38%

plutus-benchmark/script-contexts/test/V3/Data/9.6/purposeIsWellFormed-4.golden.eval

Metric Old New Δ%
CPU 19_611_399 19_419_399 -0.98%
Memory 79_830 78_630 -1.50%
Flat Size 1_844 1_861 +0.92%

plutus-ledger-api/test-plugin/Spec/Budget/9.6/geq1.golden.eval

Metric Old New Δ%
CPU 84_321_050 84_225_050 -0.11%
Memory 504_515 503_915 -0.12%
Flat Size 911 913 +0.22%

plutus-ledger-api/test-plugin/Spec/Budget/9.6/geq2.golden.eval

Metric Old New Δ%
CPU 90_738_020 90_642_020 -0.11%
Memory 543_421 542_821 -0.11%
Flat Size 1_005 1_007 +0.20%

plutus-ledger-api/test-plugin/Spec/Budget/9.6/geq3.golden.eval

Metric Old New Δ%
CPU 93_028_470 92_932_470 -0.10%
Memory 556_326 555_726 -0.11%
Flat Size 1_006 1_008 +0.20%

plutus-ledger-api/test-plugin/Spec/Budget/9.6/geq4.golden.eval

Metric Old New Δ%
CPU 81_727_338 81_631_338 -0.12%
Memory 490_010 489_410 -0.12%
Flat Size 925 927 +0.22%

plutus-ledger-api/test-plugin/Spec/Budget/9.6/geq5.golden.eval

Metric Old New Δ%
CPU 86_838_948 86_742_948 -0.11%
Memory 519_419 518_819 -0.12%
Flat Size 925 927 +0.22%

plutus-ledger-api/test-plugin/Spec/Budget/9.6/gt1.golden.eval

Metric Old New Δ%
CPU 104_672_765 104_240_765 -0.41%
Memory 623_150 620_450 -0.43%
Flat Size 1_190 1_203 +1.09%

plutus-ledger-api/test-plugin/Spec/Budget/9.6/gt2.golden.eval

Metric Old New Δ%
CPU 90_914_020 90_818_020 -0.11%
Memory 544_521 543_921 -0.11%
Flat Size 1_284 1_297 +1.01%

plutus-ledger-api/test-plugin/Spec/Budget/9.6/gt3.golden.eval

Metric Old New Δ%
CPU 113_944_518 113_512_518 -0.38%
Memory 678_162 675_462 -0.40%
Flat Size 1_285 1_298 +1.01%

plutus-ledger-api/test-plugin/Spec/Budget/9.6/gt4.golden.eval

Metric Old New Δ%
CPU 81_903_338 81_807_338 -0.12%
Memory 491_110 490_510 -0.12%
Flat Size 1_204 1_217 +1.08%

plutus-ledger-api/test-plugin/Spec/Budget/9.6/gt5.golden.eval

Metric Old New Δ%
CPU 97_055_103 96_815_103 -0.25%
Memory 579_335 577_835 -0.26%
Flat Size 1_204 1_217 +1.08%

plutus-ledger-api/test-plugin/Spec/Data/Budget/9.6/geq1.golden.eval

Metric Old New Δ%
CPU 339_163_895 337_547_895 -0.48%
Memory 998_845 988_745 -1.01%
Flat Size 939 949 +1.06%

plutus-ledger-api/test-plugin/Spec/Data/Budget/9.6/geq2.golden.eval

Metric Old New Δ%
CPU 356_777_594 355_097_594 -0.47%
Memory 1_065_515 1_055_015 -0.99%
Flat Size 990 1_000 +1.01%

plutus-ledger-api/test-plugin/Spec/Data/Budget/9.6/geq3.golden.eval

Metric Old New Δ%
CPU 370_496_887 368_720_887 -0.48%
Memory 1_111_429 1_100_329 -1.00%
Flat Size 990 1_000 +1.01%

plutus-ledger-api/test-plugin/Spec/Data/Budget/9.6/geq4.golden.eval

Metric Old New Δ%
CPU 332_716_553 331_212_553 -0.45%
Memory 955_736 946_336 -0.98%
Flat Size 946 956 +1.06%

plutus-ledger-api/test-plugin/Spec/Data/Budget/9.6/geq5.golden.eval

Metric Old New Δ%
CPU 351_276_383 349_612_383 -0.47%
Memory 1_031_900 1_021_500 -1.01%
Flat Size 946 956 +1.06%

plutus-ledger-api/test-plugin/Spec/Data/Budget/9.6/gt1.golden.eval

Metric Old New Δ%
CPU 390_276_300 388_164_300 -0.54%
Memory 1_179_960 1_166_760 -1.12%
Flat Size 1_306 1_323 +1.30%

plutus-ledger-api/test-plugin/Spec/Data/Budget/9.6/gt2.golden.eval

Metric Old New Δ%
CPU 357_145_594 355_465_594 -0.47%
Memory 1_067_815 1_057_315 -0.98%
Flat Size 1_357 1_374 +1.25%

plutus-ledger-api/test-plugin/Spec/Data/Budget/9.6/gt3.golden.eval

Metric Old New Δ%
CPU 422_330_992 420_058_992 -0.54%
Memory 1_296_509 1_282_309 -1.10%
Flat Size 1_357 1_374 +1.25%

plutus-ledger-api/test-plugin/Spec/Data/Budget/9.6/gt4.golden.eval

Metric Old New Δ%
CPU 333_084_553 331_580_553 -0.45%
Memory 958_036 948_636 -0.98%
Flat Size 1_313 1_330 +1.29%

plutus-ledger-api/test-plugin/Spec/Data/Budget/9.6/gt5.golden.eval

Metric Old New Δ%
CPU 375_739_011 373_835_011 -0.51%
Memory 1_122_324 1_110_424 -1.06%
Flat Size 1_313 1_330 +1.29%

plutus-ledger-api/test-plugin/Spec/Data/Budget/9.6/mintValueBurned.golden.eval

Metric Old New Δ%
CPU 21_732_429 21_556_429 -0.81%
Memory 112_410 111_310 -0.98%
Flat Size 276 278 +0.72%

plutus-ledger-api/test-plugin/Spec/Data/Budget/9.6/mintValueMinted.golden.eval

Metric Old New Δ%
CPU 17_383_587 17_207_587 -1.01%
Memory 93_808 92_708 -1.17%
Flat Size 265 267 +0.75%

plutus-tx-plugin/test/AsData/Budget/9.6/destructSum-manual.golden.eval

Metric Old New Δ%
CPU 6_401_583 6_321_583 -1.25%
Memory 25_195 24_695 -1.98%
Flat Size 226 228 +0.88%

plutus-tx-plugin/test/AsData/Budget/9.6/destructSum.golden.eval

Metric Old New Δ%
CPU 6_353_583 6_273_583 -1.26%
Memory 24_895 24_395 -2.01%
Flat Size 223 225 +0.90%

plutus-tx-plugin/test/AsData/Budget/9.6/recordFields.golden.eval

Metric Old New Δ%
CPU 9_112_580 8_984_580 -1.40%
Memory 33_960 33_160 -2.36%
Flat Size 168 169 +0.60%

plutus-tx-plugin/test/Budget/9.6/constAccL.golden.eval

Metric Old New Δ%
CPU 689_664_937 673_664_937 -2.32%
Memory 3_406_701 3_306_701 -2.94%
Flat Size 67 68 +1.49%

plutus-tx-plugin/test/Budget/9.6/constElL.golden.eval

Metric Old New Δ%
CPU 689_664_937 673_664_937 -2.32%
Memory 3_406_701 3_306_701 -2.94%
Flat Size 67 68 +1.49%

plutus-tx-plugin/test/Budget/9.6/findIndexCheap.golden.eval

Metric Old New Δ%
CPU 747_937 731_937 -2.14%
Memory 4_501 4_401 -2.22%
Flat Size 88 89 +1.14%

plutus-tx-plugin/test/Budget/9.6/findIndexEmptyList.golden.eval

Metric Old New Δ%
CPU 240_100 224_100 -6.66%
Memory 1_600 1_500 -6.25%
Flat Size 46 48 +4.35%

plutus-tx-plugin/test/Budget/9.6/findIndexExpensive.golden.eval

Metric Old New Δ%
CPU 6_170_550 6_154_550 -0.26%
Memory 29_630 29_530 -0.34%
Flat Size 88 89 +1.14%

plutus-tx-plugin/test/Budget/9.6/map1.golden.eval

Metric Old New Δ%
CPU 155_773_381 155_613_381 -0.10%
Memory 320_970 319_970 -0.31%
Flat Size 337 342 +1.48%

plutus-tx-plugin/test/Budget/9.6/map2.golden.eval

Metric Old New Δ%
CPU 67_859_382 67_827_382 -0.05%
Memory 197_990 197_790 -0.10%
Flat Size 455 458 +0.66%

plutus-tx-plugin/test/Budget/9.6/map3.golden.eval

Metric Old New Δ%
CPU 112_163_732 111_907_732 -0.23%
Memory 335_284 333_684 -0.48%
Flat Size 697 705 +1.15%

plutus-tx-plugin/test/Budget/9.6/show.golden.eval

Metric Old New Δ%
CPU 1_037_273_311 1_036_857_311 -0.04%
Memory 4_556_968 4_554_368 -0.06%
Flat Size 930 938 +0.86%

plutus-tx-plugin/test/Budget/9.6/sumL.golden.eval

Metric Old New Δ%
CPU 950_920_937 950_904_937 -0.00%
Memory 4_409_001 4_408_901 -0.00%
Flat Size 77 78 +1.30%

plutus-tx-plugin/test/Budget/9.6/sumR.golden.eval

Metric Old New Δ%
CPU 854_776_937 854_760_937 -0.00%
Memory 3_808_101 3_808_001 -0.00%
Flat Size 65 66 +1.54%

plutus-tx-plugin/test/BuiltinList/Budget/9.6/drop.golden.eval

Metric Old New Δ%
CPU 4_353_162 4_257_162 -2.21%
Memory 22_516 21_916 -2.66%
Flat Size 100 102 +2.00%

plutus-tx-plugin/test/BuiltinList/Budget/9.6/take.golden.eval

Metric Old New Δ%
CPU 5_114_972 5_018_972 -1.88%
Memory 25_176 24_576 -2.38%
Flat Size 104 107 +2.88%

plutus-tx-plugin/test/BuiltinList/Budget/9.6/uniqueElementJust.golden.eval

Metric Old New Δ%
CPU 1_637_344 1_605_344 -1.95%
Memory 8_736 8_536 -2.29%
Flat Size 116 118 +1.72%

plutus-tx-plugin/test/CallTrace/9.6/successfullEvaluationYieldsNoTraceLog.golden.eval

Metric Old New Δ%
CPU 3_745_072 3_633_072 -2.99%
Memory 18_748 18_048 -3.73%
Flat Size 509 514 +0.98%

Constr ann idx (processNestedApp <$> ts)
processNestedApp (Case ann t bs) =
Case ann (processNestedApp t) (processNestedApp <$> bs)
processNestedApp t = t
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you intentionally not using the transformOf termSubterms pattern we use in almost every other optimization? I really don't like catch-all clauses like that. We add a new AST node and we won't get any warning here, no indication that this should be updated.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

transformOf is bottom up, so It won't capture all nested applications. I agree with processNestedApp t = t. I'll make it so that there's no wildcard matc

Copy link
Contributor

@effectfully effectfully Nov 18, 2025

Choose a reason for hiding this comment

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

It says "bottom-up" but I think they mean something different, 'cause I wouldn't call that "bottom-up":

transformOf :: ASetter a b a b -> (b -> b) -> a -> b
transformOf l f = go where
  go = f . over l go

If I'm wrong and transformOf can't be used here, you get a free pass on calling me an insult of your choice for a year.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nope. I'm right.

Consider,

(lam a [[[[a (con integer 1)] (con integer 2)] (con integer 3)] (con integer 4)])

If I use transformOf, it will do it from the inside like so it will yield

  (lam
    a-21
    [
      (case (constr 0 (con integer 1) (con integer 2) (con integer 3)) a-21)
      (con integer 4)
    ]
  )

whereas if I to recursion myself it will do the correct thing and yield

  (lam
    a-21
    (case
      (constr 0 (con integer 1) (con integer 2) (con integer 3) (con integer 4))
      a-21
    )
  )

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I would never insult you <3

(evalSimplifierT . caseReduce)
, T.test_scopingGood "case-apply"
(genTerm @DefaultFun)
T.BindingRemovalOk
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's BindingRemovalNotOk? Not sure. Does anything break if you make it that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

also passes with BindingRemovalNotOkay. BindingRemovalNotOk should be correct.

@ana-pantilie
Copy link
Contributor

I don't understand how this is an optimisation. Can you explain the logic behind it?

@SeungheonOh
Copy link
Collaborator Author

You can check here: #7410 (comment)

Basically, applying arguments using Case/Constr is cheaper because it can apply any number of arguments in one AST node.

@SeungheonOh SeungheonOh force-pushed the sho/applyOptimization branch from 8d79313 to 253835b Compare November 21, 2025 01:38
simplifyNTimes (_soMaxSimplifierIterations opts) >=> cseNTimes cseTimes
simplifyNTimes (_soMaxSimplifierIterations opts)
>=> cseNTimes cseTimes
>=> if _soCaseApply opts then caseApply else pure
Copy link
Contributor

Choose a reason for hiding this comment

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

its strange irregularity: flag is checked here for caseApply, but not checked for cse or simplifier above 🤷🏼‍♂️

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Other ones run in a loop while case apply only run once so I didn't wanna make a binding for stuff this simple

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants