Skip to content

Throughput improvement to Stream::merge #490

Closed
@yoshuawuyts

Description

@yoshuawuyts

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions