perf: kernel `replace` with precise cache (#4796) Changes: - We avoid the thread local storage. - We use a hash map to ensure that cached values are not lost. - We remove `check_system`. If this becomes an issue in the future we should precompute the remaining amount of stack space, and use a cheaper check. - We add a `Expr.replaceImpl`, and will use it to implement `Expr.replace` after update-stage0
This is the repository for Lean 4.
See Setting Up Lean.
Please read our Contribution Guidelines first.
See Building Lean (documentation source: doc/make/index.md).