For this kind of questions, it's better to email dang ( hn@ycombinator.com ) directly to get a faster answer, sometimes the thread like this are unnoticed.
I think it's possible. I guess it's just exchanging the order of two `if`, but in similar cases I prefer to put the faster condition first, because the other involves searching the "db"[0].
[0] Note: If they didn't change the architecture, the "db" is actually a bunch of text files.