Skip to content

Conversation

@coolreader18
Copy link
Collaborator

@coolreader18 coolreader18 commented Apr 8, 2025

Description of Changes

Instead of collecting to a single vec, we collect to a linked list of vecs, which is rayon's recommended way of collecting a parallel iterator into a single data structure. This means there will be fewer allocations - for N worker threads and M query plans, it's now N vecs and N linked list nodes with standard amortizable growth, instead of M vecs that get concatenated together one at a time.

API and ABI breaking changes

Expected complexity level and risk

2 - I'm pretty confident this doesn't have a behavior change and that the changes are only optimizations, but it'd probably be worth running benchmarks to make sure

Testing

  • benchmark run

@coolreader18 coolreader18 requested a review from Centril April 8, 2025 19:36
@coolreader18 coolreader18 force-pushed the noa/opt-eval-updates branch from db7c4ee to 6cf7c90 Compare April 8, 2025 19:37
@coolreader18
Copy link
Collaborator Author

don't think this works anymore, but: benchmarks please

@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2025

Criterion benchmark results

Error when comparing benchmarks: Couldn't find AWS credentials in environment, credentials file, or IAM role.

Caused by:
Couldn't find AWS credentials in environment, credentials file, or IAM role.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2025

Callgrind benchmark in progress...

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2025

Callgrind benchmark in progress...

@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2025

Criterion benchmark results

Error when comparing benchmarks: Couldn't find AWS credentials in environment, credentials file, or IAM role.

Caused by:
Couldn't find AWS credentials in environment, credentials file, or IAM role.

@joshua-spacetime
Copy link
Collaborator

This optimization makes sense, just bear in mind that we may decide to remove parallel iteration from eval_updates entirely.

@bfops bfops added the release-any To be landed in any release window label Apr 14, 2025
@coolreader18 coolreader18 enabled auto-merge April 15, 2025 16:06
@coolreader18 coolreader18 added this pull request to the merge queue Apr 15, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 15, 2025
@coolreader18 coolreader18 added this pull request to the merge queue Apr 15, 2025
Merged via the queue into master with commit a98e44d Apr 15, 2025
14 of 15 checks passed
@coolreader18 coolreader18 deleted the noa/opt-eval-updates branch April 16, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-any To be landed in any release window

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants