[ruby-cvs:69268] shyouhei:r62087 (trunk): also use sp_inc in vm core

shyouhei at ruby-lang.org shyouhei at ruby-lang.org
Mon Jan 29 15:56:56 JST 2018

shyouhei	2018-01-29 15:56:56 +0900 (Mon, 29 Jan 2018)

  New Revision: 62087


    also use sp_inc in vm core
    Now that sp_inc attributes are officially provided as inline
    functions. Why not use them directly from the vm core, not just
    by the compiler. By doing so, it is now possible for us to
    optimize stack manipulations. We can now know exactly how many
    words of stack space an instruction consumes before it actually
    does. This changeset deletes some lines from insns.def because
    they are no longer needed.  As a result it reduces the size of
    vm_exec_core function from 32,400 bytes to 32,352 bytes on my
    It seems it does not affect performance:
    benchmark results:
    minimum results in each 3 measurements.
    Execution time (sec)
    name    before  after
    loop_for         1.093  1.061
    loop_generator   1.156  1.152
    loop_times       0.982  0.974
    loop_whileloop   0.549  0.587
    loop_whileloop2  0.115  0.121
    Speedup ratio: compare with the result of `before' (greater is better)
    name    after
    loop_for        1.030
    loop_generator  1.003
    loop_times      1.008
    loop_whileloop  0.935
    loop_whileloop2 0.949

  Modified files:

More information about the ruby-cvs mailing list