lean4 icon indicating copy to clipboard operation
lean4 copied to clipboard

feat: optimize computing `BinderInfo`s for discrimination trees

Open kmill opened this issue 1 year ago • 3 comments
trafficstars

When computing paths for discrimination trees, currently it uses getFunInfoNArgs to calculate binder infos. This does many other calculations as well, and it also doesn't handle overapplied functions. Switches to a straightforward calculation that accumulates BinderInfos.

The effect of this is a reduction of 0.05% instructions when building mathlib. This is not worth reviewing for now.

kmill avatar Dec 23 '23 18:12 kmill

!bench

kmill avatar Apr 17 '24 17:04 kmill

Here are the benchmark results for commit 1fa937db4e543546eb648901c4f08fe9cb558987. There were significant changes against commit d3e004932c1f5ac3946850692940512d381c7634:

  Benchmark   Metric                  Change
  ====================================================
+ stdlib      attribute application    -1.4% (-14.5 σ)

leanprover-bot avatar Apr 17 '24 17:04 leanprover-bot