more useful options | |
PerlMonks |
Re: Memory efficiency, anonymous vs named's vs local subroutines (anon < named )by BrowserUk (Patriarch) |
on Jul 18, 2015 at 11:19 UTC ( [id://1135301]=note: print w/replies, xml ) | Need Help?? |
Anonymous subroutines use substantially less memory than named subroutines. For the following simple subs (where nnnnnnn is a number between 0 .. 1e6):
The anonymous sub uses ~3k per sub whereas the named version uses ~4.5k per sub (64-bit perl 5.18). Update: specious conclusion removed. (The eval was failing silently and assigning undef to the array.) 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.
I'm with torvalds on this Agile (and TDD) debunked I told'em LLVM was the way to go. But did they listen!
In Section
Seekers of Perl Wisdom
|
|