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/mjit_opt_cc_insns.yml
# opt_* insns using vm_method_cfunc_is with send-compatible operands:
#   * opt_nil_p
#   * opt_not
#   * opt_eq
type: lib/benchmark_driver/runner/mjit
prelude: |
  def mjit_nil?(obj)
    obj.nil?
  end

  def mjit_not(obj)
    !obj
  end

  def mjit_eq(a, b)
    a == b
  end

benchmark:
  - script: mjit_nil?(1)
    loop_count: 40000000
  - script: mjit_not(1)
    loop_count: 40000000
  - script: mjit_eq(1, nil)
    loop_count: 8000000
  - script: mjit_eq(nil, 1)
    loop_count: 8000000