unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Stefan <stefan.tampe@spray.se>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel@gnu.org
Subject: fluids and unification
Date: Wed, 26 May 2010 13:16:18 +0200	[thread overview]
Message-ID: <60E80E8B-72DB-4BC5-B8F0-DBF65FA503D3@spray.se> (raw)
In-Reply-To: <m31vd2wce4.fsf@pobox.com>

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





  parent reply	other threads:[~2010-05-26 11:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-23 14:52 unified field theory! stefan
2010-05-23 21:12 ` Andy Wingo
2010-05-25  8:06   ` stefan
2010-05-26 11:16   ` Stefan [this message]
2010-05-26 13:13     ` fluids and unification Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60E80E8B-72DB-4BC5-B8F0-DBF65FA503D3@spray.se \
    --to=stefan.tampe@spray.se \
    --cc=guile-devel@gnu.org \
    --cc=wingo@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).