Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
RubyVM::YJIT.max_compile_time_ns
max_compile_time_ns
yjit.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/yjit.rb, line 50
def self.max_compile_time_ns
Primitive.rb_yjit_max_compile_time_ns_get
end
The maximum amount of time YJIT is allowed to spend compiling. When total_compile_time_ns goes over max_compile_time_ns, YJIT pause compilation until max_compile_time_ns is raised. If set to 0, there is no limit. This is a best-effort functionality, there are situations in which YJIT may still compile even when paused. This feature is intended to be used to control how fast the JIT warms up, to spread the compilation overhead over a longer period of time.