From: Brent Roman Date: 2007-12-29T06:20:28+09:00 Subject: Re: multibyte strings & bucket-of-bytes efficiency under 1.9.0 The first application I benchmarked on 1.9 was a logger that did a lot of "bucket of bytes" type string manipulations. The whole app ended up running 5% slower under 1.9 than it did under 1.8.6. I'd been suspecting the encoded strings were largely responsible for this. Your experience seems to confirm this. I've been thinking about implementing a: class ByteString < String for strings where character encoding is not appropriate. Any thoughts on this? - brent khaines wrote: > > My async logger, Analogger, uses slice!() on strings to shave chunks off > of incoming buffers. It's quite fast compared to alternativs under 1.8.x. > > In 1.9.0, though, Analogger was running at 8% of the 1.8.x speed. Yes, > _eight_ percent. The entire blame for the speed difference turned out to > fall on a single line that used slice!() on a string. > > The situation begs a question, though. For code that needs to implement > buckets of bytes, shouldn't there be something that offers much of the > functionality of the 1.8.x String in order to support efficient > bucket-of-bytes operations? > > There is a lot of code out there besides mine that manipulates these > chunks of bytes, and doesn't care about string encodings. It makes sense > to me that there still exist an efficient way to deal with that. > > > Kirk Haines > > > -- View this message in context: http://www.nabble.com/multibyte-strings---bucket-of-bytes-efficiency-under-1.9.0-tp14528798p14531629.html Sent from the ruby-core mailing list archive at Nabble.com.