chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Does Chicken garbage collect unreferenced symbols?


From: John Cowan
Subject: Re: [Chicken-users] Does Chicken garbage collect unreferenced symbols?
Date: Sun, 23 Aug 2009 17:38:10 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

Alaric Snell-Pym scripsit:

> Is that necessarily the best solution to your problem, though?
> Anything with an identity (a cons cell, for example) will work as a
> 'token' for a-list lookups?

The idea is to speed up string lookups.  Currently the a-list maps strings
to values, which means I must use assoc to search it.  If it mapped
symbols to values instead, I could use the faster assq.  I'd rather intern
the strings once and have done, but I don't want to cause a memory leak.

Furthermore, the string I'm looking for is sometimes derived from
symbol->string, so I actually have a symbol to start with.  This is
probably true for the majority of lookups, though not the majority
of entries.

-- 
Take two turkeys, one goose, four               John Cowan
cabbages, but no duck, and mix them             http://www.ccil.org/~cowan
together. After one taste, you'll duck          address@hidden
soup the rest of your life.
        --Groucho




reply via email to

[Prev in Thread] Current Thread [Next in Thread]