[erlang-questions] Improved regexp.erl
Wed Oct 18 02:38:14 CEST 2006
No serious benchmarks, only small tests. Comparing doing regexp:parse to
regexp:compile and then regexp:matches on a large file (400kB) I found
small speed up on straight regexps like "abc", and large speed up for
regexps with many alternatives like "[a-z]+".
No binaries yet. Not difficult to do if you can accept doing either pure
lists OR a binary. Doing iolists becomes complicated. This keeping the
same interface as now.
Also planning to do a parse transform which compiles regexp into code
within the module. Similar code to what leex generates. This will be
better at compile time as there wil be no need to build a structure to
interpret at runtime as regexp:compile does. This is really not
If I can find my old parse transform identity function.
Yariv Sadan wrote:
> Hi Robert,
> Thanks for the new regexp module! Have you ran any benchmarks
> comparing its performance to the old module? Also, I remember your
> mentioning it would be able to work with binaries. Is that capability
> On 10/17/06, Robert Virding <> wrote:
>> I have added an upgraded, drop-in replacement to the user contributions
>> in trapexit.org. It allows for compilation of regular expressions. They
>> can either be used directly in the functions in the module, as with
>> regexp:parse, or the DFA built from the regexps can be returned. Read
>> the documentation.
>> erlang-questions mailing list
More information about the erlang-questions