Skip to content

Draft: rts/stm: Introduce TVar table

Ben Gamari requested to merge wip/tvar-table into master

Here we introduce a HashTable to cache TVar lookups within the TRec, reducing the complexity of TVar operations from linear time (in the number of variables touched in a transaction) to constant time.

It's a bit unclear whether this is worthwhile given that the most transactions are small. However, it was an idea that came up in the course of looking at #24410 and I was curious about the runtime impact, so I threw together a quick implementation. This hasn't been carefully audited nor documented so I'm leaving it in Draft state for now.

See #24410.

Edited by Ben Gamari

Merge request reports