Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: Why it takes so much time here?

by PerlOnTheWay (Scribe)
on Dec 28, 2011 at 03:42 UTC ( #945275=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Why it takes so much time here?
in thread Why it takes so much time here?

I printed the time before and after the iteration, the result is both 1325041218:

print time . "\n"; my @a = any {$_== 92} 1..100000000; print "\n"; print time;

So the time is not taken by the iteration..


Comment on Re^4: Why it takes so much time here?
Select or Download Code
Re^5: Why it takes so much time here?
by ikegami (Pope) on Dec 28, 2011 at 04:27 UTC
    oh, yes it is. 1..100000000 is executed a compile-time (constant folding).

      The same number of int takes less than 1 second to initialize

      Isn't 15 secs too much time even though a scalar requires more storage(16 bytes after test) than int?

        The same number of int takes less than 1 second to initialize

        What does that mean?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2014-07-22 12:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (113 votes), past polls