[ruby-cvs:70685] normal:r63594 (trunk): rb_vm_insn_addr2insn: use st to perform addr2insn mapping

normal at ruby-lang.org normal at ruby-lang.org
Thu Jun 7 05:57:48 JST 2018


normal	2018-06-07 05:57:48 +0900 (Thu, 07 Jun 2018)

  New Revision: 63594

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

  Log:
    rb_vm_insn_addr2insn: use st to perform addr2insn mapping
    
    The current VM_INSTRUCTION_SIZE is 198, so the linear search
    painful during a major GC phase.
    
    I noticed rb_vm_insn_addr2insn2 showing up at the top of some
    profiles while working on some malloc-related stuff, so I
    decided to attack it.
    
    Most notably, the benchmark/bm_vm3_gc.rb improves by over 40%:
    
      https://80x24.org/spew/20180602220554.GA9991@whir/raw
    
    [ruby-core:87361] [Feature #14814]

  Modified files:
    trunk/compile.c
    trunk/eval.c
    trunk/iseq.c
    trunk/vm_core.h


More information about the ruby-cvs mailing list