[Tutor] 6x6 word square solver too slow

R. Alan Monroe amonroe at columbus.rr.com
Fri Apr 25 00:45:05 CEST 2008


Any bright ideas on how I can speed this up? It seems REALLY slow for
as little as it does.

I'm trying to generate word squares like this:
P R E Y
L A V A
O V E R
T E N D
except 6x6 rather than 4x4.

In particular, the profiler indicates that {method 'join' of 'str'
objects} is eating an awful lot of time (odd...), but I'm having a
brain cramp trying to think up a workaround or alternate approach.

The required sixwords.txt file can be gotten here:
http://home.columbus.rr.com/javajack/sixwords.zip
(wasn't sure if people would complain about a 43K attachment or not)


Alan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 4cyte011b.py
URL: <http://mail.python.org/pipermail/tutor/attachments/20080424/2b251182/attachment.txt>


More information about the Tutor mailing list