Feature #14814
closedrb_vm_insn_addr2insn: use sto to perform addr2insn mapping
Description
The current VM_INSTRUCTION_SIZE is 198, so the linear search
becomes a bit painful.
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.
With rubygems loaded running the benchmark suite (no --disable=gems),
this provides a significant speedup ratio for vm3_gc:
vm3_gc 1.446
Full results (with rubygems loaded):
https://80x24.org/spew/20180602220554.GA9991@whir/raw
Seems fairly straightforward, will commit in a few days.
Files
Updated by normalperson (Eric Wong) over 6 years ago
- Status changed from Open to Closed
Applied in changeset trunk|r63594.
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]