[webkit-dev] Re: regular expression notes (mostly about performance optimization)

Darin Adler darin at apple.com
Mon Jan 14 23:51:19 PST 2008


On Jan 5, 2008, at 6:27 PM, Darin Adler wrote:

> The regexp-dna expressions all could be translated from brackets  
> into character classes.
> - They have the form: /a|b/ where "a" and "b" are expressions solely  
> containing letters and character classes of the same length.
> - They could be converted into a sequence of character classes  
> without a bracket.
> - Would this be faster?

Just for the record, this turned out to be wrong. The expressions  
could not be translated into character classes. Because /abc|def/ is  
not the same thing as /[ad][be][cf]/.

     -- Darin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20080114/aa18bf85/attachment.html


More information about the webkit-dev mailing list