Hello,
Using gambit 4.6.0 I have a performance problem. It may be my mistake, but I can't see the problem. So I decided to make tests and send them here, so maybe you can point it out.
The program fills a 500x500 array or list with values corresponding to its 2d euclidean distance to a reference point (200,200).
1.3gz centrino (very old computer)
Filling a 500x500 uchar* in C: 30 ms.
Filling a 500x500 list in gambit interpreter: ~3200 ms. with two different approaches, both with integer arithmetic. If I use floating points it takes roughly double. Compiling the code drops to ~800ms. still quite high (and I don't usually compile the module when working with it).
what could I do to improve this? is something wrong with my code?
I attach the two versions.
Thank you
Álvaro