Up to 10x faster strings for C, C++, Python, Rust, and Swift, leveraging NEON, AVX2, AVX-512, and SWAR to accelerate search, sort, edit distances, alignment scores, etc 🦖
Writing some leak-checking found a few bugs and correctness issues.
sz_string_init_from would sometimes leave a residue of noise in the space field of the new string. Lightly refactor to share some of the logic so it is easier to see that all four fields are set for both shapes of string.
The copied code in move constructor and assignment shared some issues: the target for the move didn't actually get initialized with the values of the source. For the case of move assignment where the target already held values, we need to release the associated memory.
I'm happy with the test code for this; while this is probably not a complete inventory of memory leaks, we have an easy way to add tests for new ones we encounter.
Writing some leak-checking found a few bugs and correctness issues.
sz_string_init_from
would sometimes leave a residue of noise in thespace
field of the new string. Lightly refactor to share some of the logic so it is easier to see that all four fields are set for both shapes of string.The copied code in move constructor and assignment shared some issues: the target for the move didn't actually get initialized with the values of the source. For the case of move assignment where the target already held values, we need to release the associated memory.
I'm happy with the test code for this; while this is probably not a complete inventory of memory leaks, we have an easy way to add tests for new ones we encounter.