wlof / gameoflife

A simple Python implementation of Conway's Game of Life using the curses library.
MIT License
3 stars 0 forks source link

Speed factor is wonky at high speeds #1

Open wlof opened 9 years ago

wlof commented 9 years ago

The speed factor should be roughly the number of generations passing every second.

At speeds above 4x, the game just doesn't keep up.

This is probably caused by a less-than-optimal use of the less-than-optimal Python threads.

wlof commented 9 years ago

Got rid of threads altogether ('twas a silly thing anyway), but problem persists.

I should do some profiling, but I'm pretty sure it's just that the computation of a generation takes too long. Current implementation is not really optimized.

For now, capped the speed at 16x, which the game seems more or less capable of handling.

wlof commented 9 years ago

Added an optional Numpy implementation that is slightly faster. Need to do some profiling and work on optimization.