Skip to content

Conversation

@MichaHoffmann
Copy link
Contributor

@MichaHoffmann MichaHoffmann commented Nov 30, 2025

Accessing the current chunk via the slice is expensive and we should generally prefer to call methods on the memoized "cur" here. Moved the AtT at the bottom - an exhausted iterator should generally still be at its last value there so this should be sound - this removes a lot of AtT function call overhead. Did same with the Err() call as thats generally only interesting if we are not the last chunk and was surprisingly hot in profiles.

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Verification

fpetkovski
fpetkovski previously approved these changes Nov 30, 2025
Accessing the current chunk via the slice is expensive and we should
generally prefer to call methods on the memoized "cur" here.

Signed-off-by: Michael Hoffmann <[email protected]>
Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

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

How benchmark results look like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants