About the Life example...

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

About the Life example...

anyulover
Hello to all of you :)

First, thanks Marco for this wonderful app. It got me into Lua and
Palm programming (Now I switch constantly between Plua and Onboard ASM).

Yesterday, I got the example code for "Life" and decided to upgrade it
to make it more interesting (If I get somewhere, I promise to upload
it here). The thing is that it's SLOW to the point that an universe
made of  100*100 cells (A fairly small one) with just the
implementation done in the example takes about 5-8 seconds to update
to a new generation.

Is this Plua's fault or my E2 needs Red Bull?
Is there any way to optimize the example code?

Thanks a lot, I'll keep in touch :)


Pablo

PS: I'm from Argentina ^_^

Reply | Threaded
Open this post in threaded view
|

Re: About the Life example...

migueletto-2
--- In [hidden email], "anyulover" <anyulover@...> wrote:

> Yesterday, I got the example code for "Life" and decided to upgrade it
> to make it more interesting (If I get somewhere, I promise to upload
> it here). The thing is that it's SLOW to the point that an universe
> made of  100*100 cells (A fairly small one) with just the
> implementation done in the example takes about 5-8 seconds to update
> to a new generation.
>
> Is this Plua's fault or my E2 needs Red Bull?
> Is there any way to optimize the example code?

The Life example is from the standard Lua distribution. Its
implementation is very ineficient. Certainly there are better ways to
implement Life in Lua, but I just took the example as is and added to
graphic part.

Regards,
Marcio.