@ayo Nice article!
I like how little RAM your code uses.
As for the improvements - do you think an LRU of blocks would make significant improvement? I'd think that all the blocks that'd end up in the LRU already end up in kernel's page cache. So your own cache would be mostly to avoid syscalls? Or am I missing something?
The LRU cache would cache *uncompressed* blocks, so it would skip the decompression step. You're right that the savings in terms of syscalls or I/O probably wouldn't be very significant.
@ayo oh, yeah, I forgot about the compression. Makes a lot of sense.
Welcome to your niu world ! We are a cute and loving international community Ｏ(≧▽≦)Ｏ !
We are a moderated instance, that aren't supporting harassment nor hateful speech. But we aren't a "safe" space, we won't prevent you to interact with instances that aren't respecting our rules.
"Be conservative in what you send and liberal in what you receive." - Netiquette
The main language used here is English, but for most of us this isn't our main language, so it's a great place to learn!