lewton
lewton copied to clipboard
Switch to using smallvec over tinyvec
smallvec seems to be in much higher use than tinyvec, so adding tinyvec tends to increase the amount of work while using lewton as a dependency in a typical build. This PR replaces tinyvec with smallvec as a drop-in replacement.
See the reasons why tinyvec was adopted: #75 . It's 100% safe. But yeah 52 dependents vs 759 dependents...
I'm not too familiar with the operations being done with the type, but it does seem like it's collecting some kind of stream of bools into a temporary buffer of some kind.
Is the number of elements here bounded? If so, I could switch this to use a on-stack bitset instead, eliminating the dependency entirely.
Otherwise, I'm still going to insist on using smallvec here. I'm trying to minimize the dependency tree of Bevy, which depends transitively on this crate through rodio. This is the only instance of tinyvec in the entire dependency tree, while there are at least 6 uses of smallvec elsewhere.