ouroboros-consensus
ouroboros-consensus copied to clipboard
docs: draft MicroReadTVarIO.hs microbenchmark
A microbenchmark investigation of the benefits of readTVarIO
versus atomically . readTVar
. See the directory's README.md
for the motivation.
My next step here would be another microbenchmark that is more similar to the real code's scenario (notably: indirecting through MonadSTM
without specialization, and preventing sharing of the thunk across calls to atomically
).
Edit: see next message.
I favored my momentum, so I added MicroReadTVarIO2.hs
already.
I tidied it up, esp by separating out the bash scripts. I also fixed the final timing estimates, since I had originally ran them with -ticky
, which has significant run-time overhead.
The underlying motivation of this PR was to explain a regression in acquiring the BlockFetch context. This has recently been explained by a computation in the node as part of an enriched tracer, completely unrelated to Consensus. Therefore, we can close this PR; the document will remain available; it might be useful in another context.