This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Using SCMs as hash keys
- To: Andrew Chadwick <andrew dot chadwick at symbian dot com>
- Subject: Re: Using SCMs as hash keys
- From: Russell McManus <russell dot mcmanus at msdw dot com>
- Date: 21 Jan 2000 12:09:36 -0500
- Cc: guile at sourceware dot cygnus dot com
- References: <uya9j4e9r.fsf@symbian.com>
Andrew Chadwick <andrew.chadwick@symbian.com> writes:
> I know that a SCM is a long with type bits, and I'll be doing a
> scm_protect_object on each key as it gets added. g_int_hash() and
> g_int_equal() seem to do the right thing on my system. Are there any
> issues involved with pulling out these SCMs and exporting them back to
> the Guile environment in a list?
Don't use scm_protect_object on a large number of objects; it's slow.
Protect a single hash table and put the objects in there.
-russ
--
There is always free cheese in a mousetrap.