From ab73022cb2357db5e757aed6a7c2f0c4268aa7c7 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Wed, 4 Apr 2018 13:17:01 +0000 Subject: [PATCH] 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 --- mjit_compile.c | 5 +++++ 1 file changed, 5 insertions(+) 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