Skip to content

Throughput improvement to Stream::merge #490

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

Closed
yoshuawuyts opened this issue Nov 9, 2019 · 3 comments
Closed

Throughput improvement to Stream::merge #490

yoshuawuyts opened this issue Nov 9, 2019 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@yoshuawuyts
Copy link
Contributor

In #437 we fixed bugs to Stream::merge. There is another improvement we may want to apply here:

Randomization

If two items from Stream::merge are ready at the same time, we will always pick the item from the first stream first. We should probably apply some randomization here to make it so we don't exhaust one stream completely before starting the other. This should reduce overall latency in some cases, as it becomes more "fair".

We can use utils::random for this purpose.

@yoshuawuyts yoshuawuyts added api design Open design questions enhancement New feature or request and removed api design Open design questions labels Nov 9, 2019
@abhishekc-sharma
Copy link
Contributor

If this were implemented what would be the correct way to handle the non-determinism for the purpose of tests ?

@ghost ghost added the good first issue Good for newcomers label Nov 9, 2019
@Razican
Copy link
Contributor

Razican commented Nov 11, 2019

Hi I would like to work on this if nobody is working on it :)

@yoshuawuyts
Copy link
Contributor Author

yoshuawuyts commented Nov 20, 2019

This has been merged as part of #503. Thanks @Razican!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants