in reply to Re^9: Speeding up named capture buffer access
in thread Speeding up named capture buffer access
I created a very simple example that matched some simple times with a few different formats, and benchmarked it using named capture buffers, alternative capture group numbering, and your method with embedded code. The alternative capture method is about 40% faster than the named buffers (so I'm going to be implementing it for at least some of the regular expression matching where the order of the matches stays the same). The embedded code was significantly slower (7x) than the named buffers. It's possible I wasn't doing it as efficiently as possible, but given that:
it appears to be significantly slower it's listed as an experimental feature the regular expressions are more complicatedI think that I'll pass on it for the time being. But it was fun to experiment with something new!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^11: Speeding up named capture buffer access
by ikegami (Patriarch) on Dec 01, 2009 at 19:49 UTC |
In Section
Seekers of Perl Wisdom