[ruby-cvs:72443] ko1:r65343 (trunk): introduce new YARV insn newhashfromarray.

ko1 at ruby-lang.org ko1 at ruby-lang.org
Wed Oct 24 10:57:27 JST 2018


ko1	2018-10-24 10:57:27 +0900 (Wed, 24 Oct 2018)

  New Revision: 65343

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

  Log:
    introduce new YARV insn newhashfromarray.
    
    * insns.def (newhashfromarray): added to replace `core_hash_from_ary`
      method to eliminate method call overhead.
    
      On my environment, I got the following benchmark results:
    
      x = {x: 1}
    
                        modified:   7864988.6 i/s
                           trunk:   6004098.1 i/s - 1.31x  slower
    
    
      x = {x: 1, y: 2}
    
                           trunk:   6127338.4 i/s
                        modified:   5232380.0 i/s - 1.17x  slower
    
    
      x = {x: 1, y: 2, z: 3}
    
                        modified:   6089553.1 i/s
                           trunk:   5249333.5 i/s - 1.16x  slower
    
      This trivial improvement should be reconsider because of usage of
      this instruction.
    
    * compile.c: ditto.
    
    * defs/id.def, vm.c: remove unused functions.

  Modified files:
    trunk/compile.c
    trunk/defs/id.def
    trunk/insns.def
    trunk/vm.c


More information about the ruby-cvs mailing list