Switch from SmallVec to 100% safe TinyVec#54
Conversation
|
I'm usually not super worried about |
|
I noticed that my CI builds for https://github.com/8573/irc-bot.rs are failing on trying to build, as a transitive dependency, smallvec 1.2, whose minimum supported Rust version (MSRV), at 1.36, is higher than mine. |
|
Oh, my apologies! I should have checked tinyvec's MSRV — also 1.36. |
|
Could you please make a new release on crates.io incorporating the changes? I see the version has already been bumped in master, and it's been months since the merge. |
|
Done |
|
Thanks a lot! |
Replaces uses of SmallVec with TinyVec, which is the same idea implemented in 100% safe code.
Performance is generally in line with SmallVec in this case, with some benchmarks being slightly slower and some slightly faster:
SmallVec 1.1.0
TinyVec 0.3.2
As you can see, e.g.
bench_is_nfd_stream_safe_normalizedandbench_nfkc_longhave improved whilebench_nfkd_longandbench_nfc_asciihave regressed, but none of the changes are dramatic.cargo testpasses, I haven't run any parametric or fuzz testing (not sure if this crate has any). TinyVec itself has been fuzz-tested for equivalence tostd::Vecusing arbitrary-model-tests framework.