perf: add `replaceImpl`

It uses the kernel implementation.
We will replace `Expr.replace` with it after update-stage0
2 files changed