New article: How to quickly look up passwords in a compressed dictionary with only a small amount of code.

I have some ideas for articles that I've been meaning to write for at least 4 years now, but instead I end up writing about an idea that popped in my head just yesterday. (And it's a fluff article indeed) :blobblush:

@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?

@Wolf480pl Thanks!

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.

Sign in to participate in the conversation

Welcome to your niu world ! We are a cute and loving international community O(≧▽≦)O !
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!