The stupid question is the question not asked | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Okay, I re-ran the benchmark with your exact code on my computer, and I got:
So I guess it must be highly platform-dependent then. I'm using perl 5.8.0 on Mac OS X (darwin 6.3) on a PPC G3 (iBook). Assuming you're using x86, a possible explanation would be that doing regex might benefit from the PPC's rich number of general-purpose registers, while the x86's memory-oriented instruction set is perhaps more suited at executing the (stack-based) perl opcodes. But it's just a guess... •Update: I'm enclosing all my benchmark stuff in readmore-tags to avoid cluttering the thread In reply to Re: Re: Re: Re: Regex matching on anywhere but the beginning or end of a line
by xmath
|
|