You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Joe Schaefer <jo...@sunstarsys.com> on 2001/09/27 21:50:22 UTC

[OT] clp.moderated, was- Re: Backticks as fast as XS

Matt Sergeant <ms...@startechgroup.co.uk> writes:

> > -----Original Message-----
> > From: Doug MacEachern [mailto:dougm@covalent.net]
> > 
> > i'm guessing part of the difference in your code is due to 
> > fprintf having a pre-allocated buffer, whereas the SV's SvPVX 
> > has not been pre-allocated and gets realloc-ed each time you 
> > call sv_catpv.  have a look at the code below, fprintf is faster 
> > than sv_catpvn, but if the SvPVX is preallocated,
> > sv_catpvn becomes faster than fprintf:
> > 
> > timethese(1_000, {
> >     fprintf   => sub { TickTest::fprintf() },
> >     svcat     => sub { TickTest::svcat() },
> >     svcat_pre => sub { TickTest::svcat_pre() },
> > });
> > 
> > Benchmark: timing 1000 iterations of fprintf, svcat, svcat_pre...
> >    fprintf:  9 wallclock secs ( 8.72 usr +  0.00 sys =  8.72 
> > CPU) @ 114.68/s (n=1000)
> >      svcat: 13 wallclock secs (12.82 usr +  0.00 sys = 12.82 
> > CPU) @ 78.00/s (n=1000)
> >  svcat_pre:  2 wallclock secs ( 2.75 usr +  0.00 sys =  2.75 
> > CPU) @ 363.64/s (n=1000)
> 
> Very interesting. I'll try that (I wish you'd been listening to clp.mod when
> I posted - other perl gurus weren't much help).
> 
> Matt.

<OT type="rant"> 
IMO clp.mod is a sinkhole for perl-related discussions, and like
Abigail[1], despite its noble intentions I think clp.mod fails to 
serve the Perl community in any useful way.  IME, this mailing list (and 
p5p when appropriate) is one of the best places to ask about perl 
performance-related issues (that aren't covered by Stas' guide, 
of course :).  You could also don the high rubber boots and try 
clp.misc, which IMO seems to be a bit improved since the creation 
of the beginners' [2] mailing lists.

[1]: (long, unwrapped url)
  http://groups.google.com/groups?hl=en&group=comp.lang.perl.misc&rnum=1&selm=slrn820ckc.ls3.abigail%40alexandra.delanet.com

  Personally I had similar experiences with clp.moderated, 
  so I don't read it anymore either.

[2]: IIRC, they are at
  http://learn.perl.org/

 but I can't connect to it at the moment.

</OT>

-- 
Joe Schaefer


Re: [OT] clp.moderated, was- Re: Backticks as fast as XS

Posted by Ask Bjoern Hansen <as...@valueclick.com>.
On 27 Sep 2001, Joe Schaefer wrote:

[beginners lists]
> [2]: IIRC, they are at
>   http://learn.perl.org/

yup, thousands of subscribers.  Incredibly amounts of (helpful)
mails.

http://archive.develooper.com/beginners@perl.org/
http://archive.develooper.com/beginners-cgi@perl.org/


 - ask

ps. we had some network trouble around noon Thursday (PST) on the
network where "onion" (serving learn.perl.org and others) is
located, that's why you couldn't connect. =)

-- 
ask bjoern hansen, http://ask.netcetera.dk/         !try; do();
more than a billion impressions per week, http://valueclick.com