[macruby-changes] [MacRuby/MacRuby] a7280c: Performance improvement in IO#puts.
noreply at github.com
noreply at github.com
Fri Jun 24 09:28:48 PDT 2011
Branch: refs/heads/master
Home: https://github.com/MacRuby/MacRuby
Commit: a7280cfc168ddd019c732508ad691062bbb4dcfd
https://github.com/MacRuby/MacRuby/commit/a7280cfc168ddd019c732508ad691062bbb4dcfd
Author: Watson <watson1978 at gmail.com>
Date: 2011-06-24 (Fri, 24 Jun 2011)
Changed paths:
M io.c
Log Message:
-----------
Performance improvement in IO#puts.
* before
user system total real
puts one char 0.290000 0.400000 0.690000 ( 0.683528)
* after
user system total real
puts one char 0.120000 0.350000 0.470000 ( 0.461036)
{{{
require 'benchmark'
require 'tempfile'
file = open('/tmp/puts_benchmark', 'w')
char = 'a'
Benchmark.bm do |x|
x.report do
100000.times do
file.puts char
end
end
end
}}}
More information about the macruby-changes
mailing list