top | item 44613294

(no title)

trwhite | 7 months ago

How does a read-ahead cache work and why is it so effective here?

discuss

order

bhaney|7 months ago

When I request 1 random byte, the library fetches 512 bytes (for example) of random data from the OS, and then returns the first byte to me. When I request another 1 random byte, it just gives me the next byte that it already fetched without needing to make another syscall.

trwhite|7 months ago

Thanks for the explanation