are double cells safe to use?

2013-10-29 Thread Roland Orre
I consider using double cells for efficient implementation of binary trees. Is this safe? (i.e. no pre-assumptions made somewhere what these are used for) For prototyping I intended to add double-cons set-cbr! set-ccr! cbr ccr to the scheme level. Is this safe? They will only contain or refer to

Re: are double cells safe to use?

2013-10-29 Thread Roland Orre
Sorry, double cells are even encouraged to use according the manual under "Allocating cells" (I had missed that) and no specific cares as long as they contain only SCM. On Tue, Oct 29, 2013 at 11:15 AM, Roland Orre wrote: > I consider using double cells for efficient implementation of binary tre

Re: Guile 2.2 TODO

2013-10-29 Thread Ludovic Courtès
Andy Wingo skribis: > On Sun 01 Sep 2013 13:03, Andy Wingo writes: [...] >> I think that's pretty much it. Obviously it would be nice to get a lot >> of other things into 2.2 but this is the necessary bit. I think we >> should shoot for a 2.1.0 release around 1 December; dunno. > > I think w

Re: vhash speed thread safeness

2013-10-29 Thread Ludovic Courtès
Hi, Stefan, Stefan Israelsson Tampe skribis: > I did some tests witha C-based vhash implementation, it's possible to > increse the speed by 30x compared to current vlist imlpementation in > guile. It would be possible to get this speed today if one implemented > vhash-assoc as a VM op. Anyway u

Re: [PATCH] Add procedures to convert alists into hash tables

2013-10-29 Thread Ludovic Courtès
Hi! David Thompson skribis: > When looking through the different hash table implementations > available (Guile, SRFI-69, and RNRS) I found a useful SRFI-69 > procedure that had no equivalent in Guile's native hash table API: > alist->hash-table. I think it would make sense to implement them in

Re: vhash speed thread safeness

2013-10-29 Thread Stefan Israelsson Tampe
On Tue, Oct 29, 2013 at 1:34 PM, Ludovic Courtès wrote: > Hi, Stefan, > > Stefan Israelsson Tampe skribis: > > > I did some tests witha C-based vhash implementation, it's possible to > > increse the speed by 30x compared to current vlist imlpementation in > > guile. It would be possible to get t

Re: are double cells safe to use?

2013-10-29 Thread Mark H Weaver
Roland Orre writes: > I consider using double cells for efficient implementation of binary trees. > > Is this safe? (i.e. no pre-assumptions made somewhere what these are used for) > > For prototyping I intended to add > double-cons > set-cbr! > set-ccr! > cbr > ccr > > to the scheme level. Is th

Re: vhash speed thread safeness

2013-10-29 Thread Ludovic Courtès
Stefan Israelsson Tampe skribis: > On Tue, Oct 29, 2013 at 1:34 PM, Ludovic Courtès wrote: > >> Hi, Stefan, >> >> Stefan Israelsson Tampe skribis: >> >> > I did some tests witha C-based vhash implementation, it's possible to >> > increse the speed by 30x compared to current vlist imlpementation

Re: are double cells safe to use?

2013-10-29 Thread Roland Orre
Thanks, > So the best you could do with a double cell would be to store three SCM > objects, which is no better space efficiency than you already get with a > vector of size 3 (in the master branch, which will become Guile 2.2). but with the vector I also have an extra cell (single?) pointing to

Re: vhash speed thread safeness

2013-10-29 Thread Ian Price
l...@gnu.org (Ludovic Court$(D+2(Bs) writes: > I wonder if there$B!G(Bs some other data structure with similar properties > that doesn$B!G(Bt have the thread-safety issue. Maybe Ian has an idea? HAMTs (another Bagwell creation) might be a reasonable option, but I don't have a complete impl