From 676926cd17134193d3a526ca952ffa32bbac4c23 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 21 Apr 2021 12:12:59 -0500 Subject: [PATCH 1/2] test(perf): Bench more parsing cases --- benches/tokenize.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/benches/tokenize.rs b/benches/tokenize.rs index f86e61c..9cd0ce9 100644 --- a/benches/tokenize.rs +++ b/benches/tokenize.rs @@ -6,14 +6,31 @@ fn bench_tokenize(c: &mut Criterion) { let mut group = c.benchmark_group("tokenize"); for (name, sample) in data::DATA { let len = sample.len(); - group.bench_with_input(BenchmarkId::new("ident", name), &len, |b, _| { + group.bench_with_input(BenchmarkId::new("ident(bytes)", name), &len, |b, _| { let parser = typos::tokens::Tokenizer::new(); b.iter(|| parser.parse_bytes(sample.as_bytes()).last()); }); + group.bench_with_input(BenchmarkId::new("ident(str)", name), &len, |b, _| { + let parser = typos::tokens::Tokenizer::new(); + b.iter(|| parser.parse_str(sample).last()); + }); group.bench_with_input(BenchmarkId::new("words", name), &len, |b, _| { let symbol = typos::tokens::Identifier::new_unchecked(sample, 0); b.iter(|| symbol.split().last()); }); + group.bench_with_input( + BenchmarkId::new("ident(bytes)+words", name), + &len, + |b, _| { + let parser = typos::tokens::Tokenizer::new(); + b.iter(|| { + parser + .parse_bytes(sample.as_bytes()) + .flat_map(|i| i.split()) + .last() + }); + }, + ); } group.finish(); } From e64e2b659b25054fb9427bd9968d5c79ae5ca243 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 21 Apr 2021 12:14:19 -0500 Subject: [PATCH 2/2] chore: Fix release commit message --- release.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release.toml b/release.toml index 4a0089b..9f68bd1 100644 --- a/release.toml +++ b/release.toml @@ -1,4 +1,4 @@ -pre-release-commit-message = "chore({{crate_name}}): Release {{version}}" +pre-release-commit-message = "chore: Release" no-dev-version = true tag-message = "{{tag_name}}" tag-name = "{{prefix}}v{{version}}"