-
Notifications
You must be signed in to change notification settings - Fork 30
feat(rust/sedona-testing): Add Raster Benchmarking #297
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
Conversation
…g arrays from struct array (#306) This optimization simply hoists per-column arrays in `RasterStructArray`, so that we don't need to extract individual arrays from the struct array each time we construct a `RasterRefImpl` value in `RasterStructArray::get`. We also marked short getters as inline so that the compiler could optimize away the construction of intermediate objects in simple metadata getter functions such as RS_Width. I've benchmarked this using the `rs_width` bench in PR #297, the performance improvement is quite significant. Baseline: ``` native-rs_width-Array(Raster(64, 64)) time: [7.3810 ms 7.3912 ms 7.4034 ms] Found 8 outliers among 100 measurements (8.00%) 5 (5.00%) high mild 3 (3.00%) high severe ``` This PR: ``` native-rs_width-Array(Raster(64, 64)) time: [474.81 µs 475.81 µs 476.75 µs] change: [-93.593% -93.576% -93.560%] (p = 0.00 < 0.05) Performance has improved. Found 2 outliers among 100 measurements (2.00%) 2 (2.00%) high severe ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds benchmarking infrastructure for raster functions, specifically implementing a benchmark for the rs_width function. The changes introduce a new Raster variant to the BenchmarkArgSpec enum to support generating raster data for benchmarks.
Key Changes:
- Extended benchmark argument specifications to support raster data generation
- Added infrastructure to create tiled rasters with configurable dimensions for benchmarking
- Implemented a benchmark for the
rs_widthfunction using 64x64 rasters
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
rust/sedona-testing/src/benchmark_util.rs |
Added Raster variant to BenchmarkArgSpec enum with support for generating tiled rasters and corresponding test coverage |
rust/sedona-raster-functions/benches/native-raster-functions.rs |
Created new benchmark file for raster functions, starting with rs_width |
rust/sedona-raster-functions/Cargo.toml |
Added benchmark configuration with criterion dependency |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
paleolimbot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Adds raster bench functionality and a first benchmark for the
rs_widthIssue: #263
Sample run: