HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/src/ruby-3.0.2/benchmark/vm_block_handler.yml
# :FIXME: is there a way to benchmark block_handler_type_ifunc?

prelude: |
  p = proc{_1}
  o = Object.new
  def o.each
    i = 0
    while i < 3_000_000 do
      yield i
      i += 1
    end
  end

benchmark:
  - name: block_handler_type_iseq
    script: |
      o.each{_1}

  - name: block_handler_type_symbol
    script: |
      o.each(&:itself)

  - name: block_handler_type_proc
    script: |
      o.each(&p)

loop_count: 1