[ruby-cvs:71782] shyouhei:r64690 (trunk): make opt_str_freeze leaf

shyouhei at ruby-lang.org shyouhei at ruby-lang.org
Wed Sep 12 12:39:37 JST 2018


shyouhei	2018-09-12 12:39:36 +0900 (Wed, 12 Sep 2018)

  New Revision: 64690

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

  Log:
    make opt_str_freeze leaf
    
    Simply use DISPATCH_ORIGINAL_INSN instead of rb_funcall.  This is,
    when possible, overall performant because method dispatch results are
    cached inside of CALL_CACHE.  Should also be good for JIT.
    
    ----
    
    trunk: ruby 2.6.0dev (2018-09-12 trunk 64689) [x86_64-darwin15]
    ours: ruby 2.6.0dev (2018-09-12 leaf-insn 64688) [x86_64-darwin15]
    last_commit=make opt_str_freeze leaf
    Calculating -------------------------------------
                              trunk        ours
        vm2_freezestring     5.440M     31.411M i/s -      6.000M times in 1.102968s 0.191017s
    
    Comparison:
                     vm2_freezestring
                    ours:  31410864.5 i/s
                   trunk:   5439865.4 i/s - 5.77x  slower

  Added files:
    trunk/benchmark/vm2_freezestring.yml
  Modified files:
    trunk/compile.c
    trunk/insns.def
    trunk/vm_insnhelper.c


More information about the ruby-cvs mailing list