You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(virtqueue): Use smallvec for UsedDeviceWritableBuffer
Currently, we were allocating a two-item VecDeque on the heap with talc
for every call to {PackedVq, SplitVq}::try_recv, which is horribly
inefficient. The reason I presume this was done before was to have cheap
pop_front operations, but since they usually only contain two items,
moving around all the items of a smallvec is super cheap anyways and we
can skip the conversion and allocation.
We may want to replace this with a smallvec equivalent of VecDeque in
the future, but there is no such struct yet and we currently don't
really need it either.
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
0 commit comments