top | item 30518682

(no title)

gabagool | 4 years ago

This is really cool and I love that people are using Wordle to explore and explain computer science concepts (to people like me).

> The speed-up is significant, about 20x faster. This makes sense because instead of scanning half of all words on average, you only need to scan half of the words with the same first letter. I’ll assume this isn’t exactly 13x due to letter distribution.

Extremely minor, but I think one would still expect a 26x speedup, right? You go from searching half of all words to half of 1/26th of all words. Obviously there are more words starting with S than X and all, but my question is just in theory.

discuss

order

naniwaduni|4 years ago

Right. The effect of letter distribution, however, is that you're more likely to be searching a bucket with more words in it. So getting somewhat less than 26x speedup makes sense.

kevincox|4 years ago

Ah, you are absolutely right. I'll update the post. I think your logic for why you get less than 26x makes sense too.