Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: Adding a lot of small integers

by kappa (Chaplain)
on Jan 09, 2010 at 23:28 UTC ( [id://816562]=note: print w/replies, xml ) Need Help??


in reply to Re: Adding a lot of small integers
in thread Adding a lot of small integers

Thank you for comprehensive comment, I'm jumping right in to try your suggestions!

First, I see no reason to avoid strict and warnings. The only overhead it adds is the clearing of the variables in each loop pass. If that's an issue, you can avoid the clearing by declaring the vars outside the loops.

Adding use strict; and declaring all vars right at the top with our increases my runtime by 5%.

I didn't know about strict clearing the variables, are you sure this is the reason?

--kap

Replies are listed 'Best First'.
Re^3: Adding a lot of small integers
by ikegami (Patriarch) on Jan 10, 2010 at 08:17 UTC

    Adding use strict; and declaring all vars right at the top with our increases my runtime by 5%.

    That's surprising, but why would use our?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-19 07:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found