Sha256: 350be4fa38c9533f2200177b6527ba18d96a8ec25a51cfcd60f13eb0c6bce71e
Contents?: true
Size: 657 Bytes
Versions: 33
Compression:
Stored size: 657 Bytes
Contents
$: << File.join(File.dirname(__FILE__), '..', 'lib') require 'radius' if RUBY_PLATFORM == 'java' require 'java' require 'radius/parser/jscanner' end require 'benchmark' document = <<EOF Before it all <r:foo> Middle Top <r:bar /> Middle Bottom </r:foo> After it all EOF amount = 1000 Benchmark.bmbm do |bm| bm.report('vanilla') do scanner = Radius::Scanner.new(:scanner => Radius::Scanner) amount.times { scanner.operate('r', document) } end if RUBY_PLATFORM == 'java' bm.report('JavaScanner') do scanner = Radius::JavaScanner.new(JRuby.runtime) amount.times { scanner.operate('r', document) } end end end
Version data entries
33 entries across 33 versions & 3 rubygems