[前][次][番号順一覧][スレッド一覧]

ruby-changes:50885

From: k0kubun <ko1@a...>
Date: Wed, 4 Apr 2018 22:17:09 +0900 (JST)
Subject: [ruby-changes:50885] k0kubun:r63092 (trunk): mjit_compile.c: disable stack consistency check

k0kubun	2018-04-04 22:17:01 +0900 (Wed, 04 Apr 2018)

  New Revision: 63092

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63092

  Log:
    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

  Modified files:
    trunk/mjit_compile.c
Index: mjit_compile.c
===================================================================
--- mjit_compile.c	(revision 63091)
+++ mjit_compile.c	(revision 63092)
@@ -180,6 +180,11 @@ mjit_compile(FILE *f, const struct rb_is https://github.com/ruby/ruby/blob/trunk/mjit_compile.c#L180
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]