diff options
author | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-04 13:17:01 +0000 |
---|---|---|
committer | k0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-04 13:17:01 +0000 |
commit | ab73022cb2357db5e757aed6a7c2f0c4268aa7c7 (patch) | |
tree | bb953911f61f3c04bba36200432bcce4c76debb4 /mjit_compile.c | |
parent | c2007e191b2220619e524a8168411de7fdd2cae9 (diff) | |
download | ruby-ab73022cb2357db5e757aed6a7c2f0c4268aa7c7.tar.gz |
mjit_compile.c: disable stack consistency check
This should be basically safe because VM already does this check.
I don't think JIT-ed code, which should be specially optimized, should
still do this.
* Benchmark
Calculating -------------------------------------
before before,--jit after,--jit
optcarrot 53.851 68.050 71.641 fps
Comparison:
optcarrot
after,--jit: 71.6 fps
before,--jit: 68.1 fps - 1.05x slower
before: 53.9 fps - 1.33x slower
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63092 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit_compile.c')
-rw-r--r-- | mjit_compile.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mjit_compile.c b/mjit_compile.c index 268c230907..014a2e8927 100644 --- a/mjit_compile.c +++ b/mjit_compile.c @@ -180,6 +180,11 @@ mjit_compile(FILE *f, const struct rb_iseq_constant_body *body, const char *func status.compiled_for_pos = ZALLOC_N(int, body->iseq_size); status.local_stack_p = !body->catch_except_p; + if (!mjit_opts.debug) { + fprintf(f, "#undef OPT_CHECKED_RUN\n"); + fprintf(f, "#define OPT_CHECKED_RUN 0\n\n"); + } + #ifdef _WIN32 fprintf(f, "__declspec(dllexport)\n"); #endif |