develooper Front page | perl.perl5.porters | Postings from November 1999

Re: Patch for Threading and Regexps

Thread Previous | Thread Next
From:
Mark-Jason Dominus
Date:
November 19, 1999 13:09
Subject:
Re: Patch for Threading and Regexps
Message ID:
19991119211017.14030.qmail@plover.com

> > -	    (s = rx->startp[paren]) != -1 &&
> > -	    (t = rx->endp[paren]) != -1)
> > +	    (s = get_match_node(rx)->startp[paren]) != -1 &&
> > +	    (t = get_match_node(rx)->endp[paren]) != -1)
> 
> Nope.  You do not want to make function calls in this tight code.

It is not a function call.  It is a compile-time macro:

> > +#ifdef USE_THREADS
> > +#  define get_match_node(regexp) (&(PL_matchvars[regexp->regexp_index]))
> > +#else
> > +#  define get_match_node(regexp) (regexp)
> > +#endif


> Did not look any further.

I guess not.

Thread Previous | 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