[gambit-list] performance

Álvaro Castro-Castilla alvaro.castro.castilla at gmail.com
Fri Apr 2 09:51:54 EDT 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20100402/c06fa10e/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-scheme.scm
Type: application/octet-stream
Size: 1218 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20100402/c06fa10e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-c.c
Type: application/octet-stream
Size: 838 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20100402/c06fa10e/attachment-0001.obj>


More information about the Gambit-list mailing list