From: John E. <ja...@zh...> - 2002-07-16 07:06:47
|
After getting some advice off the pygame list I think I have a pretty good version of my influence map now. I thought someone on this list might be interested or at least someone checking the archives. The new and improved code is around 6-7x faster. The main gain was obtained by converting all the array functions to slice notation and eliminating most of the needless copying of arrays. The new version is attached and is much better commented. It is also unabridged, as it was pointed out that it wasn't entirely clear what was going on in the last (edited) version. Hopefully things are more obvious in this one. Anyways... I just hating leaving a thread without a conclusion. Hope someone finds this useful. -- John Eikenberry [ja...@zh... - http://zhar.net] ______________________________________________________________ "They who can give up essential liberty to purchase a little temporary safety, deserve neither liberty nor safety." --B. Franklin |