in reply to Re: Why can code be so slow?
in thread Why can code be so slow?
CGI.pm, by itself, is around 237K bytes of code - and it pulls in Carp (8 Kbytes in perl 5.8.8). Carp then pulls in Exporter (15 Kbytes), Exporter pulls in Exporter::Heavy (6 Kbytes) and Exporter::Heavy pulls in strict (3 Kbytes). If you do a 'use warnings;' that pulls another 16 Kbytes. If you do 'use CGI::Carp;' that will tack on another 16 Kbytes.
I shouldn't have to say, yet again, that CGI.pm uses a self-loading scheme to avoid compiling everything, so the way you load it makes a tremendous difference.
I will say that in this type of microbenchmark, the contents of @INC and the location of modules in @INC can have a tremendous difference. Perl startup speed can depend greatly on the number of stat calls.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Why can code be so slow?
by snowhare (Friar) on May 01, 2007 at 19:23 UTC | |
by chromatic (Archbishop) on May 01, 2007 at 20:44 UTC | |
by snowhare (Friar) on May 02, 2007 at 01:46 UTC | |
by freakingwildchild (Scribe) on May 03, 2007 at 09:33 UTC | |
by freakingwildchild (Scribe) on May 01, 2007 at 21:11 UTC | |
by jbert (Priest) on May 02, 2007 at 16:19 UTC | |
|
Re^3: Why can code be so slow?
by BrowserUk (Patriarch) on May 01, 2007 at 18:50 UTC |