On Wed, Apr 4, 2012 at 6:21 PM, Mark H Weaver
<address@hidden> wrote:
Hi Stefan,
Did you intend to send this as private email? Wouldn't it be better to
discuss this on the mailing list?
> Because what would be cool though is to use an
> assoc-list as in kanren and when it grows to large issue a batch
> synchronisation and bring out that whole assoc into modifying the
> thread0 datastructure in one go.
Another possibility is to simply replace the assoc-list with a more
efficient purely-functional map structure. Guile already has vhashes,
but even better would be persistent Hash Array Mapped Tries (HAMT) as
used in Clojure. See Phil Bagwell's paper "Ideal Hash Trees" for the
basic idea, and the persistent purely-functional variant used in Clojure
simply copies the path from the new leaf to the root in the obvious way
to add or delete without mutation. I'd like to add a highly-optimized
implementation of this to Guile soon.
I do think that this can be interesting to try out. Also the lookup could be coded in C in order
to speed up kanren for guile.
/Stefan
Regards,
Mark