[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] nursery logic
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] nursery logic |
Date: |
Sat, 15 Jul 2006 09:24:19 +0200 |
On 7/15/06, Brandon J. Van Every <address@hidden> wrote:
Makefile.am has a script that configures chicken-defaults.h with a
nursery value. The following condition will never be reached:
if [ $$bestn -eq 0 ]; then \
nursery="256*1024"; \
echo "hm, no decent nursery value here ... using 256K"; \
because
if [ $$bestn -eq 0 ]; then \
best=$$tm; \
bestn=$$n; \
is always executed on the first pass, and n is never 0. n is a member of
for n in 16 24 32 48 64 128 256 512 1024; do \
I point this out in case the desired logic is other than the actual
logic.
I'm just a hopeless shell programmer, so don't expect too much from
the pieces of shellcode in the makefile. If you (or someone else) can
code this in a more elegant fashion, please go ahead.
Also I wonder whether you want less-than-or-equal or simply
less-than:
elif [ $$tm -le $$best ]; then \
best=$$tm; \
bestn=$$n; \
less-than-or-equal says "if all things are the same, then prefer a
bigger nursery." less-than would say "...prefer a smaller nursery."
Well, a bigger nursery would be preferable in any case (less major GCs).
This "nsampling" takes a very simple benchmark (browse) and tries
to estimate a good nursery value but its just a simple test.
cheers,
felix