MCPcopy Create free account
hub / github.com/douchuan/algorithm / MSD_best_case

Function MSD_best_case

benches/strings.rs:75–82  ·  view source on GitHub ↗
(b: &mut Bencher)

Source from the content-addressed store, hash-verified

73
74#[bench]
75fn MSD_best_case(b: &mut Bencher) {
76 // all strings equal, need check all chars
77 let words = common::util::vec_alphabet("1DNB377".len());
78 let mut words: Vec<&str> = words.iter().map(|it| it.as_str()).collect();
79 b.iter(|| {
80 MSD::sort(&mut words);
81 });
82}
83
84#[bench]
85fn sub_search_kmp(b: &mut Bencher) {

Callers

nothing calls this directly

Calls 4

vec_alphabetFunction · 0.85
sortFunction · 0.50
lenMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected