Skip to content

Faster tryReadTMVarIO #89

@epoberezkin

Description

@epoberezkin

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].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions