Well, I was thinking smaller to start with. Hotspot identifies places where
classes don't escape a method for instance and can use that to elide locks
and inline field references without calling a constructor for instance. So
it would be great to do this at the fn level in clojure as well, you kn
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
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 kno