Antichains are made to work with partially ordered times but that forces
them to allocate a heap vector even in simple cases of totally ordered
timestamp types which will never have more than one element in it.
Short of defining a Frontier trait and abstracting generically over
multiple independent frontier implementation this simple PR handles it
at runtime by backing Antichains with SmallVec.
most timestamp times are gonna be <= the size of a usize, a vec is 3 usizes, and a smallvec appears to be the size of the array + 1 usize, so making the array's length smaller than 2 is probably just a waste!
Antichains are made to work with partially ordered times but that forces them to allocate a heap vector even in simple cases of totally ordered timestamp types which will never have more than one element in it.
Short of defining a
Frontier
trait and abstracting generically over multiple independent frontier implementation this simple PR handles it at runtime by backingAntichain
s withSmallVec
.