mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
mjit.h: skip accessing mjit_opts if JIT-ed
We want to skip checking `mjit_opts.wait` for already JIT-ed case. Optcarrot is slightly improved like 65.20 fps -> 66.60 fps. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0ff7fed70f
commit
af71ee55ef
1 changed files with 3 additions and 6 deletions
9
mjit.h
9
mjit.h
|
@ -102,17 +102,14 @@ mjit_exec(rb_execution_context_t *ec)
|
|||
total_calls = ++body->total_calls;
|
||||
|
||||
func = body->jit_func;
|
||||
if (UNLIKELY(mjit_opts.wait && mjit_opts.min_calls == total_calls && mjit_target_iseq_p(body)
|
||||
&& func == (mjit_func_t)NOT_ADDED_JIT_ISEQ_FUNC)) {
|
||||
mjit_add_iseq_to_process(iseq);
|
||||
func = mjit_get_iseq_func(body);
|
||||
}
|
||||
|
||||
if (UNLIKELY((ptrdiff_t)func <= (ptrdiff_t)LAST_JIT_ISEQ_FUNC)) {
|
||||
switch ((enum rb_mjit_iseq_func)func) {
|
||||
case NOT_ADDED_JIT_ISEQ_FUNC:
|
||||
if (total_calls == mjit_opts.min_calls && mjit_target_iseq_p(body)) {
|
||||
mjit_add_iseq_to_process(iseq);
|
||||
if (UNLIKELY(mjit_opts.wait)) {
|
||||
func = mjit_get_iseq_func(body);
|
||||
}
|
||||
}
|
||||
return Qundef;
|
||||
case NOT_READY_JIT_ISEQ_FUNC:
|
||||
|
|
Loading…
Add table
Reference in a new issue