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

Scale is now a ref object to avoid excessive stack usage #36

Merged
merged 2 commits into from
Feb 14, 2020

Conversation

Vindaar
Copy link
Owner

@Vindaar Vindaar commented Feb 14, 2020

Scale previously was a huge stack waster. This caused the failures
seen in:
nim-lang/Nim#13206

The test =tests/tests.nim= previously required a stack of about 3600
kB to avoid a stack overflow. With the =Scale= being a =ref object= we
get that down to 135 kB!

I simply checked the impact of making each used object a ref object on the tests.nim test case.

impact_ref_object_on_stack_usage

Scale previously was a huge stack waster. This caused the failures
seen in:
nim-lang/Nim#13206

The test =tests/tests.nim= previously required a stack of about 3600
kB to avoid a stack overflow. With the =Scale= being a =ref object= we
get that down to 135 kB!
@Vindaar
Copy link
Owner Author

Vindaar commented Feb 14, 2020

I have no idea why github pretends travis didn't perform a build of this. It certainly did and it passed. So merging.

@Vindaar Vindaar merged commit 236fd6c into master Feb 14, 2020
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.

1 participant