[macruby-changes] [MacRuby/MacRuby] 2d4ae7: updates flag of string in advance when duplicates ...

noreply at github.com noreply at github.com
Fri Sep 2 01:10:40 PDT 2011


  Branch: refs/heads/master
  Home:   https://github.com/MacRuby/MacRuby

  Commit: 2d4ae7a2ea48149ea4e0db972aa157084d4b80fd
      https://github.com/MacRuby/MacRuby/commit/2d4ae7a2ea48149ea4e0db972aa157084d4b80fd
  Author: Watson <watson1978 at gmail.com>
  Date:   2011-09-02 (Fri, 02 Sep 2011)

  Changed paths:
    M string.c

  Log Message:
  -----------
  updates flag of string in advance when duplicates a string.

* before
      user     system      total        real
  0.790000   0.100000   0.890000 (  0.866363)
* after
      user     system      total        real
  0.090000   0.100000   0.190000 (  0.185894)
----
require 'benchmark'
Benchmark.bm do |x|
  x.report {
    str = "abc" * 100_000 + "\n"
    1000.times do
      str.chomp
    end
  }
end




More information about the macruby-changes mailing list