[MacRuby/MacRuby] 3b5596: Performance improvement in StringScanner#rest_size
Branch: refs/heads/master Home: https://github.com/MacRuby/MacRuby Commit: 3b5596fa39dfc3a571b19a4bb77edb1d99e5b53a https://github.com/MacRuby/MacRuby/commit/3b5596fa39dfc3a571b19a4bb77edb1d99... 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#rest_size * before user system total real 0.200000 0.010000 0.210000 ( 0.211851) * after user system total real 0.010000 0.000000 0.010000 ( 0.004731) ---- require 'benchmark' require 'strscan' Benchmark.bm do |x| str = "x" * 50000 s = StringScanner.new(str) x.report do 10000.times do s.rest_size end end end
participants (1)
-
noreply@github.com