Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^3: Optimizing Iterating over a giant hash

by biohisham (Priest)
on Dec 26, 2009 at 15:59 UTC ( #814428=note: print w/replies, xml ) Need Help??

in reply to Re^2: Optimizing Iterating over a giant hash
in thread Optimizing Iterating over a giant hash

When the program output is directed to the terminal the filehandle associated with the output will be in line-buffered mode but would be block-buffered otherwise (when the output is directed to a filehandle other than the terminal STDOUT)...Buffering can not be switched off but setting the output-autoflush variable to non-zero would make the print statement not wait for the buffer to flush rather than directly outputting to the file associated with the filehandle.

I understand that 'out of memory!' would flash when the buffer is not autoflushed in such cases and that there's large amount of data, now, if I am mistaken or cloudy on this one (I believe I am somehow) you're welcome to go ahead and correct/clarify for I am basically from a non-IT backrgound...

Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.

Replies are listed 'Best First'.
Re^4: Optimizing Iterating over a giant hash
by chromatic (Archbishop) on Dec 26, 2009 at 19:28 UTC
    I understand that 'out of memory!' would flash when the buffer is not autoflushed in such cases....

    I'm not aware of any such cases. That doesn't mean that they don't exist, merely that I've never heard of any.

    Buffers tend to be something like 4k on modern Linux-style systems. I have trouble imagining a system on which saving 4k is the difference between completing a task and running out of memory, at least with Perl. (If I had to write such a program, I'd use C and forbid dynamic allocation.)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://814428]
[marto]: it should just be a script, pp, or on windows pp.bat, post install you should just be able to call pp -x packed.exe as the PPM package should put everything required into the appropriate path
[marto]: ah, some time ago pp became it's own package, try searching your repo for PAR::Packer
[marto]: again, Strawberry + cpanm for the win: cpanm pp to install

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2018-01-19 14:19 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (218 votes). Check out past polls.