Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

CGI::Simple vs CGI.pm - Is twice as fast good enough?

by tachyon (Chancellor)
on Feb 16, 2002 at 00:06 UTC ( #145790=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my ($start, $end, $cgitime, $simpletime);
    my $n = 100;
    ...
    # With use strict commented out (CGI.pm does not use strict)
    Loading CGI 100 times takes 39 seconds
    Loading CGI::Simple 100 times takes 23 seconds
    
  2. or download this
    use Benchmark;
    use CGI qw/:cgi /;
    ...
    Benchmark: timing 10000 iterations of CGI, Simple...
           CGI: 32 wallclock secs (31.20 usr +  0.00 sys = 31.20 CPU) @ 32
    +0.51/s (n=10000)
        Simple: 18 wallclock secs (18.57 usr +  0.00 sys = 18.57 CPU) @ 53
    +8.50/s (n=10000)
    
  3. or download this
    use Benchmark;
    
    ...
    Benchmark: timing 100 iterations of CGI, Simple...
           CGI: 42 wallclock secs (43.50 usr +  0.00 sys = 43.50 CPU) @  2
    +.30/s (n=100)
        Simple: 18 wallclock secs (18.56 usr +  0.00 sys = 18.56 CPU) @  5
    +.39/s (n=100)
    
  4. or download this
    C:\>type cgi.pl
    
    ...
    100 iterations using CGI::Simple takes 40 seconds
    
    C:\>
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://145790]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2015-07-06 11:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (72 votes), past polls