Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ETA had some noticeable issues when processing large amounts of real world data. Low values of
etaBufferwith fast increments cause the ETA to go to zero. High values ofetaBuffercause serious performance issues due to excess allocations. This PR improves the ETA behaviour in both situations.I've added tests to verify the changes and a benchmark to demonstrate the difference.
Master branch (4x speed):

This PR (1x speed):

Notice the improved ETA stability and overall performance. Increasing
etaBufferwill make the old implementation slower and slower, while the new implementation stays at about the same speed.BTW It seems the maintainer isn't very active. I would be happy to contribute more to this repo as a contributor.
The repo's code style is very outdated and could use an overhaul, so I'll likely just do a rewrite if this doesn't get merged. (But I think it would be best to improve this repo since it has many users)