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

add stictness to vector updating in histogram_ to avoid space leak #114

Merged
merged 1 commit into from
Feb 9, 2017

Conversation

alexandersgreen
Copy link
Contributor

When using the Kernel Density Estimation algorithm, we detected a space leak that causes a stack overflow for large inputs. After some profiling, this was discovered to be due to a lack of strictness in the histogram_ function when it updates an element in a vector.
This change simply uses a bang pattern to introduce strictness in that function as necessary to remove the space leak, and enable us to run the Kernel Density Estimation functions in constant space.

@bos bos merged commit 730f4a0 into haskell:master Feb 9, 2017
@bos
Copy link
Collaborator

bos commented Feb 9, 2017

Thanks!

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.

None yet

2 participants