ouroboros-consensus icon indicating copy to clipboard operation
ouroboros-consensus copied to clipboard

docs: draft MicroReadTVarIO.hs microbenchmark

Open nfrisby opened this issue 1 year ago • 3 comments

A microbenchmark investigation of the benefits of readTVarIO versus atomically . readTVar. See the directory's README.md for the motivation.

nfrisby avatar Nov 16 '23 18:11 nfrisby

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.

nfrisby avatar Nov 16 '23 18:11 nfrisby

I favored my momentum, so I added MicroReadTVarIO2.hs already.

nfrisby avatar Nov 16 '23 21:11 nfrisby

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.

nfrisby avatar Nov 16 '23 22:11 nfrisby

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.

amesgen avatar May 31 '24 15:05 amesgen