Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: CPU Boundries, Buffering, & Speed Discussion

by Laurent_R (Parson)
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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (10)
As of 2014-09-17 14:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (81 votes), past polls