It was Tuesday, December 09, 2003 when Robert Brown took the soap box, saying:
: Rob Dixon writes:
:  > I'm sure you have something useful to say. This seems such a waste of
:  > your effort.
:  > 
:  > Rob
: 
: I think we are failing to communicate.  What I am asking is:

Thanks for the clarification, this was getting a bit out of hand.  :-)

: "Does the regular expression mechanism in perl optimize regular
: expressions such as the one you used earlier in this thread so that
: the execution overhead is nearly as good as the C approach I outlined
: earlier in this thread?  In other words, for the problem stated
: earlier, does o(C) = o(perl)?  

The answer is, C almost always going to be much faster almost all the
time, YMMV.  Really the only way to tell is with tests and benchmarks,
but you can almost always bet on C.

: Can I really use regular expressions as my main tool for scanning and
: modifying strings and expect to get speeds comparable to what I would
: get with hand tailored code?  I hope so, because that would be
: wonderful. 

You could, however, make very good use of some builtin Perl functions
like substr(), length(), pos(), index(), rindex(), study(), and so
on.  No regular expressions, but you don't always need them.


  Casey West

-- 
I'd rather listen to Newton than to Mundie. He may have been dead for
almost three hundred years, but despite that he stinks up the room
less. 
 -- Linus Torvalds


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to