diff options
author | Canop <cano.petrole@gmail.com> | 2020-05-01 14:01:02 +0200 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2020-05-01 21:31:53 +0200 |
commit | 0199162bc8d4fee5bb7f07fbb41570df95205057 (patch) | |
tree | 74c6bb798700b7dc7cc21c0173319f6ee51ba02c /benches | |
parent | cf52bbe7dc19cba78d65f431caa2af36c23da589 (diff) |
command/verb/apply refactoring
* simpler, with immutable commands
* more commands can be triggered by shortcuts
* one can apply verbs to the input (using shortcuts)
Diffstat (limited to 'benches')
-rw-r--r-- | benches/fuzzy.rs | 129 |
1 files changed, 101 insertions, 28 deletions
diff --git a/benches/fuzzy.rs b/benches/fuzzy.rs index fddd3b3..cbbadf8 100644 --- a/benches/fuzzy.rs +++ b/benches/fuzzy.rs @@ -1,39 +1,112 @@ - use { broot::pattern::FuzzyPattern, - criterion::{ - black_box, - criterion_group, - criterion_main, - Criterion, - }, + criterion::{black_box, criterion_group, criterion_main, Criterion}, }; - static PATTERNS: &[&str] = &["réveil", "AB", "e", "brt"]; // this list contains 100 names, which makes it easier to estimate the duration // of a pattern matching per file name. static NAMES: &[&str] = &[ - " brr ooT", "Réveillon", "dys", "test", " tetsesstteststt ", - "a rbrroot", "Ab", "test again", "des réveils", "pi", - "a quite longuer name", "compliqué - 这个大象有多重", "brrooT", "1", "another name.jpeg", - "aaaaaab", "a ab abba aab", "abcdrtodota", "palimpsestes désordonnés", "a", - "π", "normal.dot", "ùmeé9$njfbaù rz&é", "FactoryFactoryFactoryFactory.java", "leftPad.js", - "Cargo.toml", "Cargo.lock", "main.rs", ".gitignore", "lib.rs", - " un réveil", "aaaaaaaaaaaaaaaaabbbbbbb", "BABABC B AB", "réveils", "paem", - "poëme", "mjrzemrjzm mrjz mrzr rb root", "&cq", "..a", "~~~~~", - "ba", "bar", "bar ro ot", "& aé &a é", "mùrz*jfzùenfzeùrjmùe", - "krz", "q", "mjrfzm e", "dystroy.org", "www", - "termimad", "minimad", "regex", "lazy_regex", "jaquerie", - "Tillon", "Tellini", "Garo", "Portequoi", "Terdi", - "Ploplo", "le dragon", "l'ours", "la tortue géante", "le chamois", - "dystroy", "un petit peu n'importe quoi", "dans", "cette", "liste", - "Broot", " broot", " broot ", "b-root", "biroute", - "Miaou", "meow", "et", "surtout", "La Grande Roulette", - "this list is", "very obviously", "tailored at stressing", "the engine", "and the reader", - "C++", "javascript", "SQL", "C#", "Haskell", - "Lisp", "Pascal", "and", "Fortran", "are just missing from this codebase", - "denys", "seguret", "is", "the", "author", + " brr ooT", + "Réveillon", + "dys", + "test", + " tetsesstteststt ", + "a rbrroot", + "Ab", + "test again", + "des réveils", + "pi", + "a quite longuer name", + "compliqué - 这个大象有多重", + "brrooT", + "1", + "another name.jpeg", + "aaaaaab", + "a ab abba aab", + "abcdrtodota", + "palimpsestes désordonnés", + "a", + "π", + "normal.dot", + "ùmeé9$njfbaù rz&é", + "FactoryFactoryFactoryFactory.java", + "leftPad.js", + "Cargo.toml", + "Cargo.lock", + "main.rs", + ".gitignore", + "lib.rs", + " un réveil", + "aaaaaaaaaaaaaaaaabbbbbbb", + "BABABC B AB", + "réveils", + "paem", + "poëme", + "mjrzemrjzm mrjz mrzr rb root", + "&cq", + "..a", + "~~~~~", + "ba", + "bar", + "bar ro ot", + "& aé &a é", + "mùrz*jfzùenfzeùrjmùe", + "krz", + "q", + "mjrfzm e", + "dystroy.org", + "www", + "termimad", + "minimad", + "regex", + "lazy_regex", + "jaquerie", + "Tillon", + "Tellini", + "Garo", + "Portequoi", + "Terdi", + "Ploplo", + "le dragon", + "l'ours", + "la tortue géante", + "le chamois", + "dystroy", + "un petit peu n'importe quoi", + "dans", + "cette", + "liste", + "Broot", + " broot", + " broot ", + "b-root", + "biroute", + "Miaou", + "meow", + "et", + "surtout", + "La Grande Roulette", + "this list is", + "very obviously", + "tailored at stressing", + "the engine", + "and the reader", + "C++", + "javascript", + "SQL", + "C#", + "Haskell", + "Lisp", + "Pascal", + "and", + "Fortran", + "are just missing from this codebase", + "denys", + "seguret", + "is", + "the", + "author", ]; fn score_of_benchmark(c: &mut Criterion) { |