Elf M. Sternberg
40811151ab
The C and Rust versions are now comparable, with a memory-reuse and a memory-safe version for Rust. The memory-safe version is five times faster than the C version; the memory-reuse version (technically safe, but can panic under some very rare circumstances) is ten times faster. I suspect the reasons for he speedup are strictly in the `for()` loop in the C version for copying the string, where the Rust version probably uses memcpy() under the covers to transfer the short string into the destination. |
||
---|---|---|
.. | ||
Makefile | ||
bench_patprep.c | ||
gen_rust_examples.c | ||
patprep.c | ||
patprep.h |