From: Tanaka Akira Date: 2008-03-24T21:50:00+09:00 Subject: Re: Changing the algorithm of String#* In article , Yukihiro Matsumoto writes: > Does this make any meaningful difference? memcpy(), which is O(n) > seems significant. I implemented (and committed) similar idea for 1.9 a month ago. (r15514) My implementation doesn't use floating point operation, though. % time ruby -ve '"a" * 100000000' ruby 1.9.0 (2008-03-24 revision 15830) [i686-linux] -e:1: warning: useless use of * in void context ruby -ve '"a" * 100000000' 0.12s user 0.10s system 93% cpu 0.231 total % time ruby-1.8 -ve '"a" * 100000000' ruby 1.8.6 (2008-03-11 patchlevel 5000) [i686-linux] -e:1: warning: useless use of * in void context ruby-1.8 -ve '"a" * 100000000' 3.68s user 0.08s system 97% cpu 3.843 total -- Tanaka Akira