Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: CPU Boundries, Buffering, & Speed Discussion

by Laurent_R (Canon)
on Sep 13, 2013 at 18:57 UTC ( #1054000=note: print w/replies, xml ) Need Help??

in reply to CPU Boundries, Buffering, & Speed Discussion

I read up on the buffering issues, but confess, I have no idea what buffering is other than a place to store data (I assume in the memory) for quick access?

Buffering is, for example, about reading more data from the disk then you currently need, based on the assumption you will probably also need the next data chunks. The idea is that it doesn't take much more to read a full memory page than to read just a few bytes. So, you read the whole page from the disk and buffer what you don't need immediately. But, in general, Perl is doing this kind of buffering without you having to do something.

Another keyword which might be of interest to you is caching. For example, storing in memory data that are costly to calculate, to avoid calculating it again. You might want to have a look to the Memoize module, which automatize some caching for you.

  • Comment on Re: CPU Boundries, Buffering, & Speed Discussion

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1054000]
[erix]: fair enough

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2018-04-19 12:34 GMT
Find Nodes?
    Voting Booth?