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

perf: Batch nested embed parquet decoding #17549

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

coastalwhite
Copy link
Collaborator

This continues on #17542 and now also batches the actual Nesting, not only the top decoder.

I did the same benchmark with POLARS_MAX_THREADS=1 and we again see a small speedup. But I suspect that the speedup is larger for FixedSizeLists and Structs.

Benchmark 1: After Optimization
  Time (mean ± σ):     13.306 s ±  0.018 s    [User: 12.661 s, System: 0.614 s]
  Range (min … max):   13.263 s … 13.335 s    10 runs

Benchmark 2: Before Optimization
  Time (mean ± σ):     14.973 s ±  0.065 s    [User: 14.422 s, System: 0.517 s]
  Range (min … max):   14.887 s … 15.129 s    10 runs

Summary
  After Optimization ran
    1.13 ± 0.01 times faster than Before Optimization

@github-actions github-actions bot added performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars labels Jul 10, 2024
This continues on pola-rs#17542 and now also batches the actual Nesting, not only the top decoder.

I did the same benchmark with `POLARS_MAX_THREADS=1` and we again see a small
speedup. But I suspect that the speedup is larger for `FixedSizeList`s and
`Struct`s.

```
Benchmark 1: After Optimization
  Time (mean ± σ):     13.306 s ±  0.018 s    [User: 12.661 s, System: 0.614 s]
  Range (min … max):   13.263 s … 13.335 s    10 runs

Benchmark 2: Before Optimization
  Time (mean ± σ):     14.973 s ±  0.065 s    [User: 14.422 s, System: 0.517 s]
  Range (min … max):   14.887 s … 15.129 s    10 runs

Summary
  After Optimization ran
    1.13 ± 0.01 times faster than Before Optimization
```
@ritchie46 ritchie46 merged commit 8fd0c5b into pola-rs:main Jul 10, 2024
19 of 20 checks passed
@coastalwhite coastalwhite deleted the parquet-batch-nested branch July 10, 2024 13:19
@c-peters c-peters added the accepted Ready for implementation label Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Ready for implementation performance Performance issues or improvements python Related to Python Polars rust Related to Rust Polars
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants