On Sat, Aug 15, 2009 at 4:23 PM, Andy Fingerhut <
andy_finger...@alum.wustl.edu> wrote:

> Not to say this ought to be done, but would it be possible to have no
> 'edit' field *at all* for persistent data structures (not even a null
> reference), and only an edit field at the "root" data structure of a
> transient (none of the children would have one, only the root), and
> preserve O(1) transient/persistent! calls?


The problem is when you have several calls to transient/persistent! You have
to be able to tell transient nodes owned by the current transient processing
from older transient nodes left in place by previous calls to persistent!.
(and these transient nodes can be shared!)
One could have a set of nodes owned by the current transient but it would
incur some bookkeeping to not retain a reference to a reclaimable node.
I don't know if there's another way to do that.

But even if edit remains in all of them, I'm wondering whether it
> could be maintained that only the root node has a non-null edit field,
> while that data structure is transient.


Why do you focus on these AtomicReferences? If you contrast pre-transient
vectors and actual vectors you'll see that the overhead due to instance of
PersistentVector$Node is far more important.

Christophe

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to