From: Rick DeNatale Date: 2006-09-05T10:18:34+09:00 Subject: Re: Ordered contrast for String or Array On 9/4/06, Rick DeNatale wrote: > On 9/4/06, Rick DeNatale wrote: > > > It looks like unpack is a clear winner: > > Then on second thought, it looks like the problem with scan was the > construction of the regex, although using scan without pre-compiling > the regex is about twice as slow as unpack, using scan with a > pre-compiled regexp looks like it's about 100 times faster! Disregard that last test. It's been pointed out to me that my code using the pre-compiled regex was flawed, I used Regexp.new('/./') when it should have been either Regexp.new('.') or Regexp.new(/./). Normally I test before posting, but I got a little carried away this time. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/