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

optimization: Implement UnionIterator without buffering #52

Open
jeswr opened this issue Mar 26, 2022 · 1 comment
Open

optimization: Implement UnionIterator without buffering #52

jeswr opened this issue Mar 26, 2022 · 1 comment

Comments

@jeswr
Copy link
Collaborator

jeswr commented Mar 26, 2022

In the UnionIterator I don't see the necessity of buffering elements; since, unless you are taking a union over a huge number of iterators, the cost of testing all the unterminated iterators to see if they have an element available is likely it be an inexpensive operation; and thus should just happen on the read call; rather than in _read on a BufferedIterator. (I was just working on the Comunica reasoning components which has a lot of unions in the naive algorithm for reasoning - so I suspect it is causing some overhead there)

@jeswr
Copy link
Collaborator Author

jeswr commented Mar 31, 2022

Similar with the multiTransformIterator (should buffer the transformers but not their elements, ..., I think). The main downstream effects would be at https://github.com/comunica/asyncjoin/blob/main/join/DynamicNestedLoopJoin.js and https://github.com/comunica/asyncjoin/blob/main/join/NestedLoopJoin.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant