Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^5: "require Carp" may be hazardous to your code (assume)

by grinder (Bishop)
on Dec 05, 2006 at 20:48 UTC ( [id://587977]=note: print w/replies, xml ) Need Help??


in reply to Re^4: "require Carp" may be hazardous to your code (assume)
in thread "require Carp" may be hazardous to your code

Using much more lightweight code (for a FreeBSD system), I get around 30 milliseconds when not loading Carp, and 90 msecs when I do. Here is the code I used:

use Carp; # comment this line out, or not use BSD::Process; my $t = BSD::Process->new->elapsed_time; print $t, $/; # time in milliseconds

The times are very erratic. It seems to boil down to whether the process executes within one timeslice of the processor or not: there are definite quanta to the amount of time taken. Nevertheless, sometimes people may care about 0.06 seconds of startup time (certainly less non-negligible than 4 usec).

• another intruder with the mooring in the heart of the Perl

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://587977]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-19 17:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found