ruby-changes:66379
From: Takashi <ko1@a...>
Date: Tue, 1 Jun 2021 13:14:55 +0900 (JST)
Subject: [ruby-changes:66379] 07c05b6fe9 (master): Drop JIT_ISEQ_SIZE_THRESHOLD
https://git.ruby-lang.org/ruby.git/commit/?id=07c05b6fe9 From 07c05b6fe931337e928a89ac5ebf654862dc0eca Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Mon, 31 May 2021 21:12:27 -0700 Subject: Drop JIT_ISEQ_SIZE_THRESHOLD Compiling everything seems to contributed to improving the final performance in general. MJIT's compilation is slow anyway, especially when you need to wait for JIT compaction. This might make sense for short-time benchmarks like Optcarrot with default parameters, but it didn't give benefits in my local environment. --- mjit.c | 3 +-- mjit.h | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/mjit.c b/mjit.c index 2ee9225..e1eb913 100644 --- a/mjit.c +++ b/mjit.c @@ -250,8 +250,7 @@ static inline int https://github.com/ruby/ruby/blob/trunk/mjit.c#L250 mjit_target_iseq_p(struct rb_iseq_constant_body *body) { return (body->type == ISEQ_TYPE_METHOD || body->type == ISEQ_TYPE_BLOCK) - && !body->builtin_inline_p - && body->iseq_size < JIT_ISEQ_SIZE_THRESHOLD; + && !body->builtin_inline_p; } static void diff --git a/mjit.h b/mjit.h index 986a3ad..8cfc3d0 100644 --- a/mjit.h +++ b/mjit.h @@ -101,10 +101,6 @@ extern struct mjit_cont *mjit_cont_new(rb_execution_context_t *ec); https://github.com/ruby/ruby/blob/trunk/mjit.h#L101 extern void mjit_cont_free(struct mjit_cont *cont); extern void mjit_mark_cc_entries(const struct rb_iseq_constant_body *const body); -// A threshold used to reject long iseqs from JITting as such iseqs -// takes too much time to be compiled. -#define JIT_ISEQ_SIZE_THRESHOLD 1000 - # ifdef MJIT_HEADER NOINLINE(static COLDFUNC VALUE mjit_exec_slowpath(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_iseq_constant_body *body)); # else -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/