|Perl Monk, Perl Meditation|
Re^3: Compact data classesby BrowserUk (Pope)
|on Jun 10, 2013 at 18:12 UTC||Need Help??|
Because it allows me to 'hardcode' the numbers in the substrs.
F4_N() and F4_L() are constant subs which get optimised away during compilation, leaving hardcoded numbers which are faster than variables.
The memory saving comes from packing the fields into single strings; the performance comes from asking the sub to do as little as possible.
That said, by explaining that, I've spotted another couple of optimisations; and a potential bug. I'll get back to you with a revised version 2 days from now.
(A good reason for not uploading to cpan straight away :)
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.