There's more than one way to do things | |
PerlMonks |
Re^12: Challenge: 8 Letters, Most Wordsby McA (Priest) |
on Oct 05, 2013 at 13:38 UTC ( [id://1057030]=note: print w/replies, xml ) | Need Help?? |
Hi L~R, you're right with all. It is the result of putting code together when it's too late. I let the program run with Devel::NYTProf on a small subset of the dict. The result is what I assumed: Answering the question if a combination of letters is able to produce a word is the most expensive task. I tried to make it faster with a C-like implementation in perl, but it was slower than the hash-approach. The program is still running. Currently at iteration 879000. So, a long time to go... ;-) Anyway, a very very intersting puzzle. And it was fun looking at the different approaches and seeing that some of the "old" monks took that challenge. Best regards
In Section
Seekers of Perl Wisdom
|
|