Sha256: 6d3756b5fa33e1fdb291099dcc62dac93f2bb68cc75a3da5f331b67f6817d9a4

Contents?: true

Size: 463 Bytes

Versions: 35

Compression:

Stored size: 463 Bytes

Contents

class BenchmarkParser

rule

  target: a a a a a   a a a a a;
  a:      b b b b b   b b b b b;
  b:      c c c c c   c c c c c;
  c:      d d d d d   d d d d d;
  d:      e e e e e   e e e e e;

end

---- inner

def initialize
  @old = [ :e, 'e' ]
  @i = 0
end

def next_token
  return [false, '$'] if @i >= 10_0000
  @i += 1
  @old
end

def parse
  do_parse
end

---- footer

require 'benchmark'

Benchmark.bm do |x|
  x.report { BenchmarkParser.new.parse }
end

Version data entries

35 entries across 30 versions & 5 rubygems

Version Path
tdiary-5.2.0 vendor/bundle/ruby/2.7.0/gems/racc-1.5.2/test/bench.y
tdiary-5.1.7 vendor/bundle/ruby/3.0.0/gems/racc-1.5.2/test/bench.y
tdiary-5.1.7 vendor/bundle/ruby/2.7.0/gems/racc-1.5.2/test/bench.y
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/racc-1.5.2/test/bench.y
mumukit-content-type-1.11.1 vendor/bundle/ruby/2.6.0/gems/racc-1.5.2/test/bench.y
tdiary-5.1.6 vendor/bundle/ruby/3.0.0/gems/racc-1.5.2/test/bench.y
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/racc-1.5.2/test/bench.y
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/2.7.0/gems/racc-1.5.2/test/bench.y
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/tdiary-5.1.5/vendor/bundle/ruby/3.0.0/gems/racc-1.5.2/test/bench.y
tdiary-5.1.5 vendor/bundle/ruby/2.7.0/gems/racc-1.5.2/test/bench.y
tdiary-5.1.5 vendor/bundle/ruby/3.0.0/gems/racc-1.5.2/test/bench.y
racc-1.5.2-java test/bench.y
racc-1.5.2 test/bench.y
racc-1.5.1-java test/bench.y
racc-1.5.1 test/bench.y
racc-1.5.0-java test/bench.y
racc-1.5.0 test/bench.y
racc-1.4.16-java test/bench.y
racc-1.4.16 test/bench.y
racc-1.4.15-java test/bench.y