5 ms·
STM has nondeterministic performance characteristics and doesn’t live up to expectations.
by bad_user 8y ago
STM has nondeterministic performance characteristics and doesn’t live up to expectations.
- StreamBright 8y agoCan you elaborate? I have used it successfully in many projects. People keep saying it has bad performance but I haven't seen any proof yet.
- TeMPOraL 8y ago"Nondeterministic" doesn't mean "bad", just that things can be OK until suddenly they aren't, and you can't really predict it a priori.
- kccqzy 8y agoSTM is indeed non-deterministic in performance, but non-determinism is basically a given in all concurrency problems. In the same vein you can also say locks have non-deterministic performance characteristics: I never know how long I'm going to wait when I'm trying to acquire the lock! In other MVCC scenarios such as databases you also don't know whether your final COMMIT will fail due to concurrent writes and you have to retry. Furthermore Clojure's STM in fact has an extra primitive called commute that is not present in Haskell's STM. It makes commutative changes even faster.
- lincpa 8y agoMVCC with the same principle as STM has been widely used by RMDB.