stm icon indicating copy to clipboard operation
stm copied to clipboard

Faster tryReadTMVarIO

Open epoberezkin opened this issue 6 months ago • 0 comments

Given that under the hood it's just TVar (Maybe a), we could have a faster equivalent of readTVarIO that doesn't do STM transaction accounting.

As a side note: the costs are not huge, but with the large number of operations in a transaction they add up to a lot of time, so this issue should be better documented - we had 40min execution time cut down to 10 sec by simply replacing atomically . mapM readTVar with mapM readTVarIO and a similar effects will be obtained with tryReadTVar[IO].

epoberezkin avatar Aug 09 '24 07:08 epoberezkin