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

polymorphic regexps

Thread Next
From:
Jarkko Hietaniemi
Date:
December 16, 2000 21:56
Subject:
polymorphic regexps
Message ID:
20001216235611.A18019@chaos.wustl.edu
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
could.

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
http://www.iki.fi/jhi/8143.gz

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About