develooper Front page | perl.perl5.porters | Postings from December 2000

polymorphic regexps

Thread Next
Jarkko Hietaniemi
December 16, 2000 21:56
polymorphic regexps
Message ID:
I finally reached a state in my quest for polymorphism in which
"everything" works and I clawed back the speed loss as much as I

Depending on what one measures (the execution speed of the whole test
suite, or a repetition of regexp.t a few thousand times) and depending
on the CPU, I get results both faster and slower than without the
polymorphism patch.  The difference is in the category of -5..+7%.
E.g. in Linux/x86 the whole test suite is 0.8% slower, and 1000
repetitions of the regexp.t is 4.1% slower.  The speed loss is of
course not nice but I think it's bearable given the much more correct
operation.  Speedier implementations welcome.  I profiled the code
to find out where the speed loss might be hiding and as far as I can
tell it's practically all inside regmatch().

The patch is kinda big (125kB, 25kB even when gzipped) so I'm not
including it here but in case someone wants to take a peek before
the next snapshot, it's the change #8143, and it's also available as

$jhi++; #
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About