comparison rust/Cargo.lock @ 52284:f4aede0f01af

rust-manifest: use `memchr` crate for all byte-finding needs While writing a very dumb manifest diffing algorithm for a proof-of-concept I saw that `Manifest::find_by_path` was much slower than I was expecting. It turns out that the Rust stdlib uses slow (all is relative) code when searching for byte positions for reasons ranging from portability, SIMD API stability, nobody doing the work, etc. `memch` is much faster for these purposes, so let's use it. I was measuring ~670ms of profile time in `find_by_path`, after this patch it went down to ~230ms.
author Raphaël Gomès <rgomes@octobus.net>
date Tue, 12 Nov 2024 23:20:04 +0100
parents 65d516db7309
children f7b2806035a7
comparison
equal deleted inserted replaced
52283:fad30cb98579 52284:f4aede0f01af
650 "itertools", 650 "itertools",
651 "lazy_static", 651 "lazy_static",
652 "libc", 652 "libc",
653 "log", 653 "log",
654 "logging_timer", 654 "logging_timer",
655 "memchr",
655 "memmap2", 656 "memmap2",
656 "once_cell", 657 "once_cell",
657 "pretty_assertions", 658 "pretty_assertions",
658 "rand 0.8.5", 659 "rand 0.8.5",
659 "rand_distr", 660 "rand_distr",