On Fri, Apr 27, 2012 at 09:52:03AM -0400, Matt Bard wrote:
All,
I think you (=Matt) should look at this one first...
Agreed. I have a much newer laptop (running Windows) that I will give a test on. Your (Harald) comments made sense. Let me get back to you guys tonight after trying a few of these things. And just for clarity, I never intended to use .duration as I assumed it required more overhead (including requesting memory)... my goal was to use .clear, but when that failed, I moved on. Regardless, I'll let you guys know what I find. I really appreciate all the thoughts and help.
Check. One idea; .clear() will take as little resources as something like that could; at one simple loop it'll all fit in the CPU cache and should go through at a blazing speed... but the total time will depend on how many entries it needs to iterate over. at some point any cpu will run out of steam. Not allocating more memory than you will need will keep it to a minimum. So; if 4 seconds is enough don't allocate a minute. Maybe that was already obvious. Kas.