[gambit-list] Avoid make_array

Alex Queiroz asandroq at gmail.com
Fri Nov 6 09:14:10 EST 2009


Hallo,

On 11/6/09, Christian Jaeger <chrjae at gmail.com> wrote:
> Also, you can try to lessen the amount of memory allocations. Make
>  sure that for floating point calculations you're using the fl...
>  operations and that you use the flonum and not safe declarations in
>  those parts of the code; and/or instead of allocating temporary
>  objects always freshly, reuse them and mutate their contents. Also if
>  your allocations are mostly closures, play with the linining-limit,
>  and avoid passing closures to other compilation units (instead put the
>  called code into the same unit).
>

     Thanks for all the tips! Actually the allocations are mostly due
to creating 64-bit integers, which are bignums. Those are the keys
calculated from game positions, used in the hash table. I guess I'll
implement the transposition table and related functions in C, it will
cut garbage collection time (and hash calculation time) to a minimum.

Cheers,
-- 
-alex
@asandroq
http://www.ventonegro.org/


More information about the Gambit-list mailing list