[MacRuby-devel] String performance (yet another)
Yasu Imao
yimao.ml at gmail.com
Sun Jan 16 08:26:32 PST 2011
Hi,
I found another String performance issue, which is different from #1077. I used the same 8092 words English text in UTF-8 used in #1077.
The latest nightly (2011/01/16) is about 6 times slower than MacRuby 0.8, which was as fast as 1.9.2.
I'm just wondering if I should file this for 0.9 or for 'later'.
text = File.read("test.txt")
#text = File.read("test.txt").force_encoding("UTF-16BE")
1000.times do |i|
a = text[i,i+30]
end
*Ruby 1.8.7 0.0019 0.0018 0.0017
Ruby 1.9.2 0.029 0.030 0.029
MacRuby 0.8 0.028 0.025 0.028
MacRuby 0.9 2011/01/16 0.18 0.17 0.18
MacRuby 0.9 2011/01/16 0.0023 0.0029 0.0021
(force_encoding)
More information about the MacRuby-devel
mailing list