Project

General

Profile

Actions

Feature #18349

closed

Let --jit enable YJIT on supported platforms

Feature #18349: Let --jit enable YJIT on supported platforms

Added by k0kubun (Takashi Kokubun) almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:106173]

Description

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 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.


Related issues 1 (0 open1 closed)

Related to Ruby - Feature #17490: Rename RubyVM::MJIT to RubyVM::JITClosedActions

Updated by k0kubun (Takashi Kokubun) almost 4 years ago Actions #1

  • Description updated (diff)

Updated by nobu (Nobuyoshi Nakada) almost 4 years ago Actions #2 [ruby-core:106199]

YJIT supports only limited platforms, --jit should mean --mjit on such platforms.

Updated by k0kubun (Takashi Kokubun) almost 4 years ago Actions #3 [ruby-core:106201]

  • Subject changed from Let --jit enable YJIT to Let --jit enable YJIT on supported platforms
  • Description updated (diff)

YJIT supports only limited platforms, --jit should mean --mjit on such platforms.

That sounds reasonable. I updated my proposal.

Updated by maximecb (Maxime Chevalier-Boisvert) almost 4 years ago Actions #4 [ruby-core:106214]

I think this is a good idea. I am assuming that --jit will remain not enabled by default (which is good).

Updated by k0kubun (Takashi Kokubun) almost 4 years ago Actions #5 [ruby-core:106216]

Right, I intend to keep --jit disabled by default in the scope of this ticket.

Updated by matz (Yukihiro Matsumoto) almost 4 years ago Actions #6 [ruby-core:106562]

I agreed with the proposal, including making mjit as a fallback.

Matz.

Updated by hsbt (Hiroshi SHIBATA) almost 4 years ago Actions #7 [ruby-core:106563]

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.

Updated by k0kubun (Takashi Kokubun) almost 4 years ago Actions #8 [ruby-core:106564]

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.

Updated by k0kubun (Takashi Kokubun) almost 4 years ago Actions #9

  • Status changed from Open to Closed

Applied in changeset git|11b8aaa26a22bb67b144484af6890844771b5f46.


Rename --jit to --mjit (#5248)

  • Rename --jit to --mjit

[Feature #18349]

  • Fix a few more --jit references

  • Fix MJIT Actions

  • More s/jit/mjit/ and re-introduce --disable-jit

  • Update NEWS.md

  • Fix test_bug_reporter_add

Updated by k0kubun (Takashi Kokubun) almost 4 years ago Actions #10

Actions

Also available in: PDF Atom