Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new Send + Sync bucket backend #29

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions benches/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use self::setup::{
generate_test_strings,
BackendBenchmark,
BenchBucket,
BenchBucket2,
BenchSimple,
BenchString,
BENCH_LEN_STRINGS,
Expand Down Expand Up @@ -77,6 +78,7 @@ fn bench_get_or_intern_static(c: &mut Criterion) {
}
bench_for_backend::<BenchSimple>(&mut g);
bench_for_backend::<BenchBucket>(&mut g);
bench_for_backend::<BenchBucket2>(&mut g);
bench_for_backend::<BenchString>(&mut g);
}

Expand All @@ -103,6 +105,7 @@ fn bench_get_or_intern_fill_with_capacity(c: &mut Criterion) {
}
bench_for_backend::<BenchSimple>(&mut g);
bench_for_backend::<BenchBucket>(&mut g);
bench_for_backend::<BenchBucket2>(&mut g);
bench_for_backend::<BenchString>(&mut g);
}

Expand All @@ -129,6 +132,7 @@ fn bench_get_or_intern_fill(c: &mut Criterion) {
}
bench_for_backend::<BenchSimple>(&mut g);
bench_for_backend::<BenchBucket>(&mut g);
bench_for_backend::<BenchBucket2>(&mut g);
bench_for_backend::<BenchString>(&mut g);
}

Expand All @@ -155,6 +159,7 @@ fn bench_get_or_intern_already_filled(c: &mut Criterion) {
}
bench_for_backend::<BenchSimple>(&mut g);
bench_for_backend::<BenchBucket>(&mut g);
bench_for_backend::<BenchBucket2>(&mut g);
bench_for_backend::<BenchString>(&mut g);
}

Expand All @@ -181,6 +186,7 @@ fn bench_resolve_already_filled(c: &mut Criterion) {
}
bench_for_backend::<BenchSimple>(&mut g);
bench_for_backend::<BenchBucket>(&mut g);
bench_for_backend::<BenchBucket2>(&mut g);
bench_for_backend::<BenchString>(&mut g);
}

Expand All @@ -207,6 +213,7 @@ fn bench_get_already_filled(c: &mut Criterion) {
}
bench_for_backend::<BenchSimple>(&mut g);
bench_for_backend::<BenchBucket>(&mut g);
bench_for_backend::<BenchBucket2>(&mut g);
bench_for_backend::<BenchString>(&mut g);
}

Expand Down Expand Up @@ -237,5 +244,6 @@ fn bench_iter_already_filled(c: &mut Criterion) {
}
bench_for_backend::<BenchSimple>(&mut g);
bench_for_backend::<BenchBucket>(&mut g);
bench_for_backend::<BenchBucket2>(&mut g);
bench_for_backend::<BenchString>(&mut g);
}
7 changes: 7 additions & 0 deletions benches/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use string_interner::{
backend::{
Backend,
BucketBackend,
BucketBackend2,
SimpleBackend,
StringBackend,
},
Expand Down Expand Up @@ -122,6 +123,12 @@ impl BackendBenchmark for BenchBucket {
type Backend = BucketBackend<DefaultSymbol>;
}

pub struct BenchBucket2;
impl BackendBenchmark for BenchBucket2 {
const NAME: &'static str = "BucketBackend2";
type Backend = BucketBackend2<DefaultSymbol>;
}

pub struct BenchSimple;
impl BackendBenchmark for BenchSimple {
const NAME: &'static str = "SimpleBackend";
Expand Down
Loading