Skip to content

benchmarks: add string compression benchmark - #9060

Draft
gargiulofrancesco wants to merge 2 commits into
developfrom
fg/string-bench
Draft

benchmarks: add string compression benchmark#9060
gargiulofrancesco wants to merge 2 commits into
developfrom
fg/string-bench

Conversation

@gargiulofrancesco

@gargiulofrancesco gargiulofrancesco commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

This adds a benchmark for evaluating Vortex string encoders on representative datasets.

What changes are included in this PR?

Adds two benchmark suites for evaluating Vortex string encoders:

  • codec: Direct codec behavior when compressing an entire column.
  • vortex: End-to-end Vortex behavior when writing, opening, scanning, and canonicalizing an in-memory file.

What APIs are changed? Are there any user-facing changes?

No production Vortex APIs are changed. This PR adds the new string-bench CLI.

@gargiulofrancesco gargiulofrancesco added the changelog/feature A new feature label Jul 29, 2026
Comment thread benchmarks/string-bench/src/main.rs Outdated
Comment on lines +17 to +37
#[cfg(feature = "unstable_encodings")]
use string_bench::SerializedResult;
use string_bench::StringColumn;
use string_bench::StringEncoder;
use string_bench::bench_column;
#[cfg(feature = "unstable_encodings")]
use string_bench::bench_serialized_with_session;
use string_bench::load_clickbench_url;
use string_bench::load_tpch_l_comment;
use tabled::builder::Builder;
use tabled::settings::Style;
#[cfg(feature = "unstable_encodings")]
use vortex::VortexSessionDefault;
use vortex::array::VortexSessionExecute;
#[cfg(feature = "unstable_encodings")]
use vortex::io::runtime::BlockingRuntime;
#[cfg(feature = "unstable_encodings")]
use vortex::io::runtime::current::CurrentThreadRuntime;
#[cfg(feature = "unstable_encodings")]
use vortex::io::session::RuntimeSessionExt;
#[cfg(feature = "unstable_encodings")]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where did all the unstable encodings cfg come from?

Comment thread benchmarks/string-bench/src/main.rs Outdated
let run_codec = matches!(args.suite, BenchmarkSuite::Codec | BenchmarkSuite::Both);
let run_vortex = matches!(args.suite, BenchmarkSuite::Vortex | BenchmarkSuite::Both);

#[cfg(not(feature = "unstable_encodings"))]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use unstable encodings only

@joseph-isaacs

Copy link
Copy Markdown
Contributor

Looks reasonable

Comment thread benchmarks/string-bench/src/main.rs Outdated
Comment on lines +165 to +172
let mut columns: Vec<StringColumn> = Vec::new();
if matches("URL") {
columns.push(load_clickbench_url(args.clickbench_shard, &mut ctx).await?);
}
if matches("l_comment") {
columns.push(load_tpch_l_comment(&mut ctx).await?);
}
if columns.is_empty() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this this easy to extend with a type vec of columns you filter on maybe a trait would help, look at bench compress

@gargiulofrancesco gargiulofrancesco added changelog/chore A trivial change and removed changelog/feature A new feature labels Jul 29, 2026
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/chore A trivial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants