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

Benchmarks for Arrow IPC reader #7091

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Feb 6, 2025

Draft as it builds on #7090

Which issue does this PR close?

Rationale for this change

Similarly to #7090 we need a benchmark to show efforts to improve validation will actually speed it up.

What changes are included in this PR?

  1. Add ipc_reader benchmark for reading

Are there any user-facing changes?

No, this is only benchmark code

As you can see by the flamegraph, indeed most of the time is spent validating data (UTF8 validation specifically)

Screenshot 2025-02-06 at 3 35 34 PM

@github-actions github-actions bot added the arrow Changes to the arrow crate label Feb 6, 2025
});
}

// copied from the zero_copy_ipc example.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did want to benchmark using mmap as I think it is an important usecase

Maybe we should contemplate making this IPCBufferDecoder its own real API 🤔

})
});

group.bench_function("FileReader/read_10/mmap", |b| {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The benchmark for mmap shows even more time spent in validating
Screenshot 2025-02-06 at 3 50 14 PM

flamegraph

arrow-ipc/benches/ipc_reader.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add arrow-ipc benchmarks for the IPC reader and writer
2 participants