[gambit-list] Make the default heap size 1MB

Bradley Lucier lucier at math.purdue.edu
Thu Jan 3 20:32:57 EST 2013

On Jan 3, 2013, at 8:16 PM, Marc Feeley wrote:

>> What's your point?
> My point is simply that there doesn't seem to be a rule for choosing the best default heap size.

We're not choosing the best default heap size, we're choosing the best default minimum heap size.

>  Some programs (such as mbrot) seem to perform best on your machine with a 1 MB heap while other programs will do better with 10 MB.  Moreover, it also depends on the details of the processor.  For example on my Mac (2.6 GHz i7 with 6 MB L3 cache and 0.25 MB L2 cache) I get these numbers for your modified mbrot:

I was using the original mbrot, which eats up memory at almost twice the rate of the modified one.

> 510 ms for heap size <= 0.4 MB
> 195 ms for 0.5 MB <= heap size <= 1.3 MB
> 161 ms for 1.4 MB <= heap size <= 3.0 MB
> 140 ms for 3.1 MB <= heap size
> The lowest run time (136 ms) is at heap size = 20 MB .
> What setting should we optimize for?
> I agree however that the current setting is too low.  But given that I will change the default, I would prefer to only change it once.  What is a "reasonable" setting?  The experiment on my computer suggests "the bigger the better".

You also have a faster memory system, which perhaps makes the cache sizes less important.

It's an interesting discussion to have.  But making the minimum heap size 1MB would give most of the speed benefits you see on your machine, and may help on machines with crappier memory systems.

Anyone want to do some experiments on iOS or Android?


More information about the Gambit-list mailing list