This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: DHARMI project


Telford Tendys <telford@triangle.triode.net.au> writes:

> One thing that I have noticed is that using `cons' is very expensive
> with regards to speed. Firstly, cons is quite slow and secondly,
> the garbage collector turns up more often if you use cons. The trouble
> is that almost everything uses cons somewhere or other. Does anyone
> know how to get around this?

i'm sure you've heard these things before, but...

if you know the size of your data, use static allocation (array).  if
your data is uniform, use uniform arrays.  look for array-transform
primitives (rather than list-transform variants).  avoid `map', using
`for-each' and `set-car!' (for lists) or the array equivalent.

as for other people's consing, just forward this msg and pester them
for a next release using arrays.  :->

thi