3 ms·
I'm under the impression that transactional memory works fine - clojure as an existence proof - but Intel's hardware implementations of it are all broken and di
by JonChesterfield 4y ago
I'm under the impression that transactional memory works fine - clojure as an existence proof - but Intel's hardware implementations of it are all broken and disabled. So presumably it's a nice programming model with substantial performance overhead.
edit: one of the hazards is exceptions, but the obvious fix of 'no non-local control flow' somehow doesn't seem to be on the table.
- dkersten 4y agoOne thing I’ve realised after ~13 years of using Clojure is that I’ve never used its STM and have never actually seen other code use it. It works, but its usefulness is, to me, questionable. YMMV of course, nah just be the nature of code I’ve written or looked at.
- deleted 4y ago[deleted]
- int_19h 4y agoAs the article explains, STM works great until you need to do something other than twiddling bits in your own process memory (basically any kind of I/O or IPC). Which, on one hand, happens to exclude most practical apps. And on the other hand, real-world tasks that require concurrent processing of in-memory data generally don't require much if any processing of shared data. So you're paying that very hefty performance price for something that you can't use most of the time.