Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
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?
[ambrus]: Corion: um, that was me (duh)
[ambrus]: I just can't get you two to cooperate directly because schmorp doesn't want to be in the chatterbox
[ambrus]: maybe you should join his irc channel or something, unless that causes a flame blowup

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2016-12-09 14:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (151 votes). Check out past polls.