[MacRuby/MacRuby] 3d7efd: revert 54e77a51e1ee0a9839bb6571b22dec85011181c3 an...
Branch: refs/heads/master Home: https://github.com/MacRuby/MacRuby Commit: 3d7efdec5f13b6307284f218b69ebf3e9cf0aa8b https://github.com/MacRuby/MacRuby/commit/3d7efdec5f13b6307284f218b69ebf3e9c... Author: Watson <watson1978@gmail.com> Date: 2011-08-29 (Mon, 29 Aug 2011) Changed paths: M ext/libyaml/emitter.c M ext/libyaml/rubyext.c M lib/yaml/rubytypes.rb Log Message: ----------- revert 54e77a51e1ee0a9839bb6571b22dec85011181c3 and 29a5e837c1bb422d6d829827018162b27d30c271 (fix a #1380) Commit: fa884b70553348a0a581d03a8d9fd6e85f1e084a https://github.com/MacRuby/MacRuby/commit/fa884b70553348a0a581d03a8d9fd6e85f... Author: Watson <watson1978@gmail.com> Date: 2011-08-29 (Mon, 29 Aug 2011) Changed paths: M string.c Log Message: ----------- String#relace: avoid the memory allocation when replace self with a shorter than or equal string. * before user system total real 0.170000 0.010000 0.180000 ( 0.141742) * after user system total real 0.120000 0.000000 0.120000 ( 0.106536) ---- require 'benchmark' Benchmark.bm do |x| x.report { str = "abc" * 1024 100_000.times do str.replace("hello") end } end Compare: https://github.com/MacRuby/MacRuby/compare/6af3b3f...fa884b7
participants (1)
-
noreply@github.com