mirror of
https://github.com/ruby/ruby.git
synced 2026-10-29 00:46:26 +08:00
In 7eab8b5d48 I wanted to avoid extra
work. Since we don't actually use any profile information in ZJIT for
compiling `opt_case_dispatch`, I decided not to call the profiling
instruction.
However, this caused a regression in `mail` and `rubocop`: this call to
the profiler is also our hook to the function lifecycle code, which
triggers a rewrite from the ZJIT version of the instruction back to the
normal bare opcode. My commit stopped rewriting back to the original
opcode when the ZJIT machinery should have.
Because in the interpreter the bare opcode path is much faster for
integer-only case/when dispatch, this regressed `mail` and `rubocop`.
We'll have to figure out why we are spending a lot of time in
interpreter case/when dispatch for those benchmarks (code size?), but
for now this fixes the regression.