<aw->
how do I know what Size to use when calling (myneed)
<aw->
(myneed 22 70) - ok that works fine,
<aw->
what about (myneed 20 ?) or (myneed 24 ?)
<tankf33der>
gc is global function, move out from function first.
<aw->
it's just an example
mtsd has joined #picolisp
<tankf33der>
and set gc maximum you need after experiments.
<aw->
:\
<tankf33der>
otherwise you will get performance degradation.
<tankf33der>
creating 4M lists is suspicious.
<aw->
why?
<aw->
i read in the PicoLisp docs:
<aw->
"There are no limits imposed upon the language due to limitations of the virtual machine architecture. That is, there is no upper bound in symbol name length, number digit counts, stack depth, or data structure and buffer sizes, except for the total memory size of the host machine."
<tankf33der>
of course.
<aw->
so, not suspicious
<tankf33der>
in practice you may need something different. what you gonna do? read in 6MB file ?
<aw->
not sure why picolisp needs 70MB of memory to hold a list of 4M zeros...
<aw->
that's more suspicious
<tankf33der>
one zero is cell, not byte
<aw->
yeah... maybe i'm doing it wrong
<Regenaxer>
aw-, just multiply the list length with the cell size
<Regenaxer>
and perhaps add some safety margin
<aw->
hmmm
<aw->
Regenaxer hi
<aw->
what is the cell size? 1MB?
<aw->
no that makes no sense
<Regenaxer>
16 bytes on 64 bit
<aw->
ahhh
<aw->
there we go
<Regenaxer>
:)
<Regenaxer>
then divide by 1 M to get the gc arg
<aw->
(/ (* (** 2 22) 16) 1024 1024)
<aw->
perfect
<Regenaxer>
yes
<aw->
thank you!
<Regenaxer>
if you know the max size in advance
<aw->
+ some safety margin
<Regenaxer>
yeah
<Regenaxer>
Is this a script?
<Regenaxer>
Because in a longer running program it is not so critical, takes time only the first time
<aw->
yes
<aw->
yes i noticed that
<aw->
if it's the same values
orivej has quit [Quit: No Ping reply in 180 seconds.]