From: Robert Dober Date: 2009-06-18T18:07:36+09:00 Subject: Re: String += vs << On Thu, Jun 18, 2009 at 10:52 AM, Marc Heiler wrote: >> Ruby1.9 has enough memory on my machine to be that fast >> but still += is faster than <<. > > How should that be possible when += creates a new object > whereas << does not? Sorry please see my post above, I completely got lost. But be careful, it could be possible indeed, object allocation in the short living object pool could be way cheaper than copying into the long living object pool. But my benchmark was ridiculous I should have spotted the mistake. Robert > -- > Posted via http://www.ruby-forum.com/. > > -- Toutes les grandes personnes ont d’abord été des enfants, mais peu d’entre elles s’en souviennent. All adults have been children first, but not many remember. [Antoine de Saint-Exupéry]