You could further restrict the search to only words that contain those and only those letters. Thats a fairly quick regex with a character class and you've significantly reduced your word sets. MySQL (if you have your database in that) will even let you use regex in a query although i don't know if that will be faster or slower than doing them on your end.
I had a program once that took a set of rules and found all words that matched them, it could normaly be done in a single SQL statment but adding a temporary table saved a lot of time and shoehorning. :)
What is your source of words?
In reply to Re: OT: How to find anagrams?
by eric256
in thread OT: How to find anagrams?
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |