Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Efficiency of map vs. more verbose basic/fundamental code

by BrowserUk (Pope)
on Oct 05, 2012 at 12:21 UTC ( #997461=note: print w/replies, xml ) Need Help??


in reply to Re^2: Efficiency of map vs. more verbose basic/fundamental code
in thread Efficiency of map vs. more verbose basic/fundamental code

Still, I'm having trouble seeing why turning a standard for loop into a statement modifier cuts down on the memory usage.

I didn't suggest it did.

Only that it reduced the memory requirement compared to the map variant; and sourcecode/mindspace compared to the standard for loop.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

RIP Neil Armstrong

  • Comment on Re^3: Efficiency of map vs. more verbose basic/fundamental code

Replies are listed 'Best First'.
Re^4: Efficiency of map vs. more verbose basic/fundamental code
by aaron_baugher (Curate) on Oct 05, 2012 at 16:18 UTC

    Ah, my misunderstanding, I see that you didn't suggest what I was assuming. I agree; the statement modifier form uses less mindspace for me too.

    Aaron B.
    Available for small or large Perl jobs; see my home node.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997461]
help
Chatterbox?
[atcroft]: james28909: That particular questions was a bit of trick, actually (depending on the country you are in). More interesting is, if you are trying to subtract from an epoch time, for instance, you might have to consider when/if DST occurs for a location,
[atcroft]: because you may have to adjust the number of seconds you change from an epoch from 86400 (not to mention leap seconds)....
[atcroft]: james28909: Although if your program is using a database, you might be able to "pass the buck" to the database and ask it to do the date change for you....
[stevieb]: ++ atcroft

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2017-04-29 04:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (531 votes). Check out past polls.