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

Fix: Large negative increments #350

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

bsjones109
Copy link

Issue #219

During loops the memory may decrease from one iteration to the next. Storing max(memory, prev_line_memory) can lead to ongoing decrements of the increment value since only the max value is stored and it is used to calculate the change to the increment. This change stores the most recent memory value instead of the max.

@nyngwang
Copy link

nyngwang commented May 19, 2022

FYI: the current implementation seems wrong: (Specifically, the calculation seems wrong starting from the line 111, included)

@fabianp
Copy link
Collaborator

fabianp commented May 20, 2022

@nyngwang does the fix in this PR solve your problem?

@bsjones109
Copy link
Author

FYI: the current implementation seems wrong: (Specifically, the calculation seems wrong starting from the line 111, included)

@nyngwang Is it because the values seem too large? You can divide the number in the third column by the number in the last column to get the average increment/decrement. It's actually quite small. The second column is the max increment seen.

@nyngwang
Copy link

@fabianp No.

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 this pull request may close these issues.

3 participants