Follow

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

dev.yorhel.nl/doc/pwlookup

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
niu.moe

Welcome to your niu world ! We are a cute and loving international community O(≧▽≦)O !