From: Caleb Clausen Date: 2006-07-29T23:52:19+09:00 Subject: Re: Slow regular expressions On 7/29/06, Jeremy Henty wrote: > Yow! Calling String#match is 2-3 times as slow! Why is that? The > overhead of calling the method? I was curious about this too. It looks like it's the effort of computing a MatchData that takes all the extra time. This snippet is just as slow as using #match: bm.report '=~ literal + $~' do N.times do string =~ /a (.) c\s. e/ ; $~ end end