summaryrefslogtreecommitdiff
path: root/mjit.h
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-21 14:32:55 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-21 14:32:55 (GMT)
commitaf71ee55efb20b7f70a91a3e20cc582098aef869 (patch)
treedcf78edaaeb62adcdd6710af43abd700633bebbd /mjit.h
parent0ff7fed70fb0259ccd445c9c469b68d4d97e5fbc (diff)
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
Diffstat (limited to 'mjit.h')
-rw-r--r--mjit.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/mjit.h b/mjit.h
index c52b253..964ab38 100644
--- a/mjit.h
+++ b/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: