[macruby-changes] [MacRuby/MacRuby] d183b1: improve a performance in Array#hash

GitHub noreply at github.com
Fri Jan 25 21:04:17 PST 2013


  Branch: refs/heads/master
  Home:   https://github.com/MacRuby/MacRuby
  Commit: d183b199892e78f024eb58f9f3d2bf9b06af481a
      https://github.com/MacRuby/MacRuby/commit/d183b199892e78f024eb58f9f3d2bf9b06af481a
  Author: Watson <watson1978 at gmail.com>
  Date:   2013-01-25 (Fri, 25 Jan 2013)

  Changed paths:
    M NSArray.m

  Log Message:
  -----------
  improve a performance in Array#hash

* before
      user     system      total        real
  1.350000   0.010000   1.360000 (  1.356039)

* after
      user     system      total        real
  0.800000   0.000000   0.800000 (  0.806837)

Test Code
----
Benchmark.bm do |x|
  ary = ["a", "b", "c"] * 10000

  x.report do
    1000.times do
      ary.hash
    end
  end
end





More information about the macruby-changes mailing list