I am amazed that people are arguing over whether to include the patch based on the number of ops. Threaded perl as currently distributed is broken in a way that is fixed by this patch. Actually, I've done some moderate testing of Brian's patch, and so far it appears to fix the problems that I've experienced with threaded perl. If someone, someday wants to make a faster fix, go ahead. But please merge this with the official perl until the day that someone else has the time to speed it up. I want to do more extensive testing of threaded perl on an offical developers release, and believe that wider distribution will be benenficial. In summary, here's our approach: Step 1: Make it work. Step 2: Make it work fast. We've done step one, because we _need_ it to work. Anyone else is welcome to do step two. Rob Ilya Zakharevich wrote: > > On Fri, Nov 19, 1999 at 04:10:17PM -0500, Mark-Jason Dominus wrote: > > > > > > - (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 > > This is even much worse. How regexp_index is assigned? Is it just > incrementing? And still it is many more dereferences than what is needed. > > Ilya -- Dr. Robert K. Cunningham Information System Technology Group rkc@ll.mit.edu MIT Lincoln Laboratory *** My comments, my opinions: my responsibility. PGP key available from http://pgpkeys.mit.edu:11371Thread Previous | Thread Next