- visited : Lean.PtrSet Lean.Expr
- counter : Nat
Instances For
@[reducible, inline]
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.Expr.NumObjs.main e = match StateT.run (Lean.Expr.NumObjs.visit e) { visited := Lean.mkPtrSet, counter := 0 } with | (fst, s) => s.counter
Instances For
Returns the number of allocated Expr
objects in the given expression e
.
This operation is performed in IO
because the result depends on the memory representation of the object.
Note: Use this function primarily for diagnosing performance issues.
Equations
- e.numObjs = pure (Lean.Expr.numObjs.unsafe_impl_1 e)