Sha256: e8aa6770dbb5c15f0ae63041bee8cb2b57d1c8672029bae444f5e063ee9d0b12

Contents?: true

Size: 409 Bytes

Versions: 8

Compression:

Stored size: 409 Bytes

Contents

# test changes for performance
# ruby examples/benchmark_js.rb 100; git co lib/textpow/syntax.rb ; ruby examples/benchmark_js.rb 100
$LOAD_PATH.unshift 'lib'
require 'textpow'

syntax = Textpow.syntax('javascript')
text = File.read('examples/jquery.js')
processor = Textpow::RecordingProcessor.new

start = Time.now.to_f
(ARGV[0] || 1).to_i.times{ syntax.parse(text,  processor) }
puts Time.now.to_f - start

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
textpow-1.3.1 examples/benchmark_js.rb
textpow-1.3.0 examples/benchmark_js.rb
textpow1x-1.2.5 examples/benchmark_js.rb
textpow1x-1.2.4 examples/benchmark_js.rb
textpow1x-1.2.3 examples/benchmark_js.rb
textpow1x-1.2.2 examples/benchmark_js.rb
textpow1x-1.2.1 examples/benchmark_js.rb
textpow1x-1.2.0 examples/benchmark_js.rb