guile-devel
[Top][All Lists]
Advanced

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

fluids and unification


From: Stefan
Subject: fluids and unification
Date: Wed, 26 May 2010 13:16:18 +0200

Hi,

I've gone through the code for fluids to understand it. And how it relates to 
unification variables.

Some facts for fluids:
*       Allocation is slow, can be made faster but still it seams to be slow
                -       Allocates on the heap
                -       uses a mutex
                -       scans a list of fluid numbers from the beginning to 
find the next free one

*       Fluid numbers are used to lookup the meaning of a fluid under a context 
meaning that
        each context keep a translation table.


So fluids can be used for unification variables but it will be unpractically 
slow because new
variables are very often created. 

The current unification variables
*       Allocation is stack-like, but the stack is separate.
*       local variables to a thread e.g. not meant to be shared between threads.
*       keep an undo array. of the form (id val1 id2 val2 ....) and having the 
frames point into this
        list and at unwinding walk the list backwards and revert the variables.
*      fast to do lookup, e.g. less indirections then fluids.


So, it would be cool to make fluids allocate faster and also make unify 
variables be able to 
be shared between threads. Comments?

Regards
Stefan





reply via email to

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