Guy Hulbert wrote:
To be fair, in general a parser written in lex/yacc will usually be an order of magnitude faster than the same parser written in perl with regexp.

Always that much?  I realize that a lex/yacc parser will be more
efficient but I thought perl's regex engine was pretty fast.

Well, I was generalising, obviously. So not *always* that much... But it's not a particularly fair comparison - a regular expression is a mini interpreted language running inside another interpreted language - comparing that to lex/yacc which is going to run as fast as the disk can spew stuff out isn't exactly fair. But yes, it's going to be a lot faster.

Matt.

Reply via email to