[gambit-list] decreasing GC

Bradley Lucier lucier at math.purdue.edu
Tue Apr 23 10:22:39 EDT 2013


On Apr 23, 2013, at 9:50 AM, Zhen Shen wrote:

> Besides tail-calls, what else can i do to reduce GC?

You know, it's really hard to say without seeing your code.

You say your code is a numerical algorithm.

Are you using generic arithmetic rather than floating-point specific operators?  Are you mixing integers and floating-point numbers in arithmetic operations?  Do you have loops with flonums as arguments?  Do you try to save time by precomputing flonums before if statements rather than recomputing the expressions?  Do you use / rather than quotient, generating rational numbers?

All those things could cause numbers to be boxed rather than used inline.

Brad




More information about the Gambit-list mailing list