Issue #18349 has been updated by k0kubun (Takashi Kokubun).


> Will --yjit option remain? I prefer the following behaviors.
> * --jit means the best strategy of Ruby JIT selected by Ruby core.
> * If users hope to enforce JIT strategy, They can choose --yjit or --mjit in the future.
>
> I'm not sure the current proposal is above behavior.

I think it's the same as what's proposed here. `--jit` is to automatically choose our latest recommendation, but both `--mjit` and `--yjit` would be still useful for two use cases:

* Override the recommendation (i.e. using MJIT on x86)
* Explicitly specify JIT when the same benchmark script could be run on multiple platforms, e.g. Mac laptops of x86 or Arm.

----------------------------------------
Feature #18349: Let --jit enable YJIT on supported platforms
https://bugs.ruby-lang.org/issues/18349#change-95227

* Author: k0kubun (Takashi Kokubun)
* Status: Open
* Priority: Normal
----------------------------------------
## Proposal
* Rename the current `--jit` to `--mjit`, as well as reverting [Feature #17490]
* Let `--jit` mean `--yjit` on YJIT-supported platforms, and `--mjit` on other platforms.

## Use case
YJIT currently achieves better performance than MJIT in many benchmarks, which means users should choose YJIT over MJIT with Ruby 3.1 in many cases. Even in benchmarks where MJIT could perform well, you need to spend a lot of time to finish warmup and [tune MJIT carefully](https://speakerdeck.com/k0kubun/rubyconf-2021?slide=11) to see the peak performance.

However, it's hard for many people, not including heavy users like you reading this, to understand which JIT variant they should try and/or use MJIT properly. Assuming x86 is prevalent enough, I want to make YJIT the default JIT so that non-heavy users will be able to see the benefit of JIT earlier.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>