http://qs1969.pair.com?node_id=31799


in reply to RE: RE: RE: big performance gain
in thread Training wheels again

Following up to my own post, this invocation of the debugger shows just how many symbols were added by CGI:
halfdome.holdit.com> perl -debug Loading DB routines from perl5db.pl version 1.0402 Emacs support available. Enter h or `h h' for help. main::(-e:1): bug DB<1> x scalar keys %main:: 0 73 DB<2> use CGI qw(:standard); DB<3> x scalar keys %main:: 0 227 DB<4>
Note that the main symbol table jumped from 73 stabs to 227 stabs. There's work behind this, and that's gonna slow you down a bit. It also takes a lot of space.

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: RE: RE: RE: RE: big performance gain
by Anonymous Monk on Nov 13, 2001 at 20:24 UTC
    i only recently took the necessary code out of CGI.pm (i practically only ever needed the part for taking params off a POST-form), and packed it into my own code. not very clean, i know, but Benchmark told me the code with use CGI.pm took 500secs for 1_000_000 iterations, the other one only 3 secs. So... I'm sticking with that.