httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoffrey Young <ge...@modperlcookbook.org>
Subject Re: shell_ready function
Date Wed, 18 Aug 2004 19:44:16 GMT

> and here is the optimized version of Geoff's one:
> 
> sub shell_ready_stas {
>     my $arg = shift;
>     $arg =~ s!\\?"!\\"!g;
>     return qq["$arg"];
> }
> 
> :)

Benchmark: timing 1000000 iterations of geoff, stas...
     geoff: 64 wallclock secs (56.35 usr +  0.10 sys = 56.45 CPU) @
17714.79/s (n=1000000)
      stas: 43 wallclock secs (40.27 usr +  0.06 sys = 40.33 CPU) @
24795.44/s (n=1000000)

/me bows to the master

--Geoff

Mime
View raw message