rluvaton opened a new pull request, #15562: URL: https://github.com/apache/datafusion/pull/15562
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> N/A ## Rationale for this change I saw in my code that clone and pop front and push takes some of the time from `poll_next_inner` This is from my sampling Before: <img width="2025" alt="image" src="https://github.com/user-attachments/assets/876a012e-2bd5-4e07-80a0-2e8e40af54a3" /> After: <img width="1995" alt="image" src="https://github.com/user-attachments/assets/515da8b0-f1c6-4ff1-9025-d44e24236c47" /> ## What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> 1. Created custom `FixedSizeQueue` which avoid cloning the vector (could be avoided even without introducing this) 2. Not removing items instead just playing with indexes ## Are these changes tested? Existing tests ## Are there any user-facing changes? No -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org