I think Cliff may mean that each STM-participating memory access is 3x
slower, but in Clojure, because of immutability, a very small
proportion of accesses are Ref accesses, whereas in C/C++ *all* memory
accesses would be.

I agree that there's lots of room for adding instrumentation to
Clojure's STM, and having done some STM in Haskell I'd like to see
'retry' and 'orElse' available too.

'retry' says "The prerequisites for running this tx haven't been met,
so retry -- but wait until at least one of the Refs I've read so far
has changed"
'orElse t1 t2' attempts t1, and if it retries doesn't retry it, but
runs t2 instead -- if t2 retries t1 is tried again and so on.
--~--~---------~--~----~------------~-------~--~----~
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
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