[macruby-changes] [MacRuby/MacRuby] e5e804: improve String#reverse performance with ascii comp...
GitHub
noreply at github.com
Wed Sep 5 23:27:13 PDT 2012
Branch: refs/heads/master
Home: https://github.com/MacRuby/MacRuby
Commit: e5e8046ce0c60589f8657b11bed0a7c8040959b4
https://github.com/MacRuby/MacRuby/commit/e5e8046ce0c60589f8657b11bed0a7c8040959b4
Author: Watson <watson1978 at gmail.com>
Date: 2012-09-05 (Wed, 05 Sep 2012)
Changed paths:
M string.c
Log Message:
-----------
improve String#reverse performance with ascii compatible string
* before
user system total real
22.430000 0.420000 22.850000 ( 20.853809)
* after
user system total real
1.080000 0.000000 1.080000 ( 1.089038)
Test Code:
----
require 'benchmark'
Benchmark.bm do |x|
str = "foobarbaz" * 5000
x.report do
50_000.times do
str.reverse!
end
end
end
More information about the macruby-changes
mailing list