Sha256: 6a9a2b612d2f81a0745270e50475a9413611eae7e51d1fe77d3fbf6de59a121e

Contents?: true

Size: 252 Bytes

Versions: 12

Compression:

Stored size: 252 Bytes

Contents

require_relative "../lib/zscan"
require "benchmark"

z = ZScan.new 'a' * 100
puts Benchmark.measure{
  1000.times{
    z.pos = 0
    z.one_or_more{
      z.scan 'a'
    }
  }
}

puts Benchmark.measure{
  1000.times{
    z.pos = 0
    z.scan /a+/
  }
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
zscan-2.0.9 benchmark/one-or-more.rb
zscan-2.0.8 benchmark/one-or-more.rb
zscan-2.0.7 benchmark/one-or-more.rb
zscan-2.0.6 benchmark/one-or-more.rb
zscan-2.0.5 benchmark/one-or-more.rb
zscan-2.0.4 benchmark/one-or-more.rb
zscan-2.0.3 benchmark/one-or-more.rb
zscan-2.0.2 benchmark/one-or-more.rb
zscan-2.0.1 benchmark/one-or-more.rb
zscan-2.0 benchmark/one-or-more.rb
zscan-1.3 benchmark/one-or-more.rb
zscan-1.2 benchmark/one-or-more.rb