[MacRuby/MacRuby] 04bad6: Performance improvement in StringScanner#scan
Branch: refs/heads/master Home: https://github.com/MacRuby/MacRuby Commit: 04bad6782966490efe5e060359661d52b703222c https://github.com/MacRuby/MacRuby/commit/04bad6782966490efe5e060359661d52b7... Author: Watson <watson1978@gmail.com> Date: 2011-10-15 (Sat, 15 Oct 2011) Changed paths: M lib/strscan.rb Log Message: ----------- Performance improvement in StringScanner#scan * before user system total real 0.030000 0.000000 0.030000 ( 0.018517) * after user system total real 0.020000 0.000000 0.020000 ( 0.015783) ---- require 'benchmark' require 'strscan' Benchmark.bm do |x| str = "x" * 500000 s = StringScanner.new(str) x.report do s.scan(/./) end end
participants (1)
-
noreply@github.com