in reply to Re: Idiomatic optimizations
in thread Idiomatic optimizations
The problem with //i isn't (wasn't?) that it's slower on small strings. It's that it uses twice the memory as an equivalent character class. And when you start matching against huge strings that can really make a difference. Try your example against a 50MB string and I think you'll see what I mean. If not you can justly castigate me for being too lazy to test my own assertions.
Eagerly awaiting the second edition,
-sam
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Idiomatic optimizations
by hakkr (Chaplain) on Apr 30, 2002 at 11:40 UTC | |
by Joost (Canon) on May 01, 2002 at 08:29 UTC | |
by tadman (Prior) on May 01, 2002 at 08:37 UTC | |
by demerphq (Chancellor) on May 02, 2002 at 13:13 UTC | |
by Juerd (Abbot) on May 01, 2002 at 16:44 UTC | |
Re: Re: Re: Idiomatic optimizations
by thelenm (Vicar) on Apr 30, 2002 at 16:59 UTC |
In Section
Meditations