in reply to searching problem

If you need to run this often and your word lists are fairly constant, store them in indexed database tables.

sqlite is a simple way to experiment, and databases are designed for that sort of job :)

Then you only have to create the reverse strings once when you populate the DB.