That sounds really, really hard.  Because even if the structure is
used in only one thread, you have to check that there's never a
reference to an older version.

You could theoretically re-implement the Persistent List/Map/Set
interfaces with mutable implementations, but I don't know where to go
from there.

-SS


On Jul 27, 1:37 pm, Aaron Cohen <remled...@gmail.com> wrote:
> What kind of infrastructure would it take to do something like Escape
> Analysis in the clojure compiler?
> It seems to me that it should be possible for "something" (the clojure
> compiler?, a new JIT of some sort?) to notice that a data structure is being
> used in a thread-local manner, and use that knowledge to replace a
> Persistent data structure with a mutable one as an optimization.  Any idea
> where the best place to start looking into this would be?
>
> -- Aaron
--~--~---------~--~----~------------~-------~--~----~
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