|
From: | Alaric Snell-Pym |
Subject: | Re: [Chicken-users] Does Chicken garbage collect unreferenced symbols? |
Date: | Mon, 24 Aug 2009 10:58:12 +0100 |
On 23 Aug 2009, at 10:38 pm, John Cowan wrote:
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.
Ah, OK. When you spoke of "random" symbols, I had a fear you were generating symbols with (eg) sequential numbers as names or something similarly meaningless, just to get a 'comparison token'. ABS -- Alaric Snell-Pym Work: http://www.snell-systems.co.uk/ Play: http://www.snell-pym.org.uk/alaric/ Blog: http://www.snell-pym.org.uk/archives/author/alaric/
[Prev in Thread] | Current Thread | [Next in Thread] |