Sha256: 6d731b6027fba0eb3d47117b5989c25cb903accc3f0b9215003042000bfd4b37

Contents?: true

Size: 496 Bytes

Versions: 12

Compression:

Stored size: 496 Bytes

Contents

#
# Compare call overhead
#
prelude: |
  class Test
    def test(a)
      a + a
    end

    def method_missing(method, a)
      a + a
    end

    alias testal test
    alias_method :testam, :test
  end

  instance = Test.new

  %x{function testing(a) {return a+a;}}
benchmark:
  method: instance.test(__bmdv_i)
  alias: instance.testal(__bmdv_i)
  alias_method: instance.testam(__bmdv_i)
  method_missing: instance.testmi(__bmdv_i)
  js_funcall: |
    %x{testing(__bmdv_i)}
loop_count: 1000000

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
opal-1.8.3.rc1 benchmark/bm_call_overhead.yml
opal-1.8.2 benchmark/bm_call_overhead.yml
opal-1.8.1 benchmark/bm_call_overhead.yml
opal-1.8.0 benchmark/bm_call_overhead.yml
opal-1.8.0.beta1 benchmark/bm_call_overhead.yml
opal-1.7.4 benchmark/bm_call_overhead.yml
opal-1.8.0.alpha1 benchmark/bm_call_overhead.yml
opal-1.7.3 benchmark/bm_call_overhead.yml
opal-1.7.2 benchmark/bm_call_overhead.yml
opal-1.7.1 benchmark/bm_call_overhead.yml
opal-1.7.0 benchmark/bm_call_overhead.yml
opal-1.7.0.rc1 benchmark/bm_call_overhead.yml