SquireCore
SquireCore copied to clipboard
[Feat]: Cows in Operations
Unmet Need:
Currently, the types used in tournament sync, namely OpSlice
, hold vectors of operations. This makes sense since they could, at any point, run into a sync issue and need to return themselves and be (de)serialized. However, we can do slightly better. There is no need for this extra allocation if everything stays local.
To solve this, OpSlice
s should hold a Cow<'a, [FullOp]>
and deserialize into the owned variant. Things that hold an OpSlice
, such as a Blockage
, are free to restring their slices to be 'static
to avoid messy lifetime annotations when they are not needed. Of course, this could be added later if additional performance is needed.