Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix a caching problem in OO code causing a 4.11 performance regression
The regression was introduced by ocaml#9096 in this part of the diff: | Tcf_method (name, _, Tcfk_concrete (_, exp)) -> - let met_code = msubst true (transl_exp exp) in + let scopes = enter_method_definition ~scopes name.txt in + let met_code = + msubst true (transl_scoped_exp ~scopes exp) in transl_exp would use Translobj.oo_wrap on functions, while the new transl_scoped_expr does not. The regression was first reported by Sacha Ayoun in ocaml#10092, as it results in a large slowdown (2x slower) on the Gillian codebase, which uses an object-oriented visitor in a performance-critical way.
- Loading branch information