[macruby-changes] [MacRuby/MacRuby] 528a72: reduce the number of calls of xmalloc family in ra...

noreply at github.com noreply at github.com
Sat Jun 4 18:37:31 PDT 2011


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

Commit: 528a72bdc14f736a67c5bf9c5af0a1df36fff08f
    https://github.com/MacRuby/MacRuby/commit/528a72bdc14f736a67c5bf9c5af0a1df36fff08f
Author: Watson <watson1978 at gmail.com>
Date:   2011-06-04 (Sat, 04 Jun 2011)

Changed paths:
  M array.c

Log Message:
-----------
reduce the number of calls of xmalloc family in rary_reserve().

- before
      user     system      total        real
  0.190000   0.010000   0.200000 (  0.185828)

- after
      user     system      total        real
  0.190000   0.000000   0.190000 (  0.178484)

----
require 'benchmark'

Benchmark.bm do |x|
  ary = []
  x.report{
    1_000_000.times do
      ary << 1
    end
  }
end




More information about the macruby-changes mailing list