My N=1 deploying something equivalent was a performance boost: we replaced a lock with a write-lock for a container that had a 3:1 reader/writer ratio. Internally, the structure is held in a ref-counted tree. Only writers use the lock, readers just grab the head and run. Stale items live on until the last reader/writer is done with them.
Yea this was something I was aiming for but with a different use case, benchmarks showed a marked decrease in performance over lock-free/reallocation so unfortunately I had to abandon it. My case dealt with vectors/lists with thousands of elements per fiber so iteration performance was crucial.
View all comments
Show parent comment
3
u/Gungan_Boss_Nass premature cleverization Sep 29 '26
My N=1 deploying something equivalent was a performance boost: we replaced a lock with a write-lock for a container that had a 3:1 reader/writer ratio. Internally, the structure is held in a ref-counted tree. Only writers use the lock, readers just grab the head and run. Stale items live on until the last reader/writer is done with them.