Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Reducing memory footprint when doing a lookup of millions of coordinates

by nikosv (Hermit)
on Feb 27, 2011 at 16:29 UTC ( #890431=note: print w/ replies, xml ) Need Help??


in reply to Reducing memory footprint when doing a lookup of millions of coordinates

Maybe this is a case for Memoization

In computing, memoization is an optimization technique used primarily to speed up computer programs by having function calls avoid repeating the calculation of results for previously-processed inputs

The Memoize module makes it easy to use by wrapping around your function.

It might increase the memory footprint but make the processing faster so it better to benchmark it,and if you do use it afterall I would be interested in hearing the test results.

Memoization is not suitable for your project. I've read your question hasty and misinterpreted it


Comment on Re: Reducing memory footprint when doing a lookup of millions of coordinates
Re^2: Reducing memory footprint when doing a lookup of millions of coordinates
by richardwfrancis (Sexton) on Feb 28, 2011 at 08:33 UTC

    Wow, I've definitely got plenty to work with here. Thank you all for your help.

    Kind Regards,
    Rich

      Be aware that memoisation will not help your problem at all.

      Memoisation speeds up repetitive calculations by caching the results of those calculations to avoid recalculating them. It uses (often prodigious amounts of) memory to gain speed.

      Since your stated goal is to reduce memory usage; since you have no repetitive calculations; any attempt to use the linked module could not help your performance and would increase your memory footprint, probably to the point of out-of-memory failure.


      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.
        Thanks BrowserUK,

        I had a read up on Memoization and came to the same conclusion. However I realised I'd implemented it in another recent project without actually knowing what it was!

        Regards
        Rich

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2014-08-23 18:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (176 votes), past polls