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

The lib is using 256 KB of memory instead of 64 KB (as claimed) #2

Closed
eleweek opened this issue Sep 3, 2019 · 2 comments
Closed

The lib is using 256 KB of memory instead of 64 KB (as claimed) #2

eleweek opened this issue Sep 3, 2019 · 2 comments

Comments

@eleweek
Copy link

eleweek commented Sep 3, 2019

I outlined bigger problem in #1, but a quick fix to reduce RAM consumption for the lib is to:

// Skipping S from HSL
// var cubes = sides * sides * sides * sides * sides * sides * sides;
var cubes:number = sides * sides * sides * sides * sides * sides * sides;

It looks like a typo - there is one extra * sides.

Again, thanks for the library - it works great, but some memory can be saved!

@darosh
Copy link
Owner

darosh commented Sep 3, 2019

Oh, yes it is a 192 KB heavy typo. Thanks!

@eleweek
Copy link
Author

eleweek commented Sep 3, 2019

It's also easily fixable by removing one of the sides. The lib is allocating 256 KB but using only 64KB.

darosh added a commit that referenced this issue Sep 3, 2019
fixing #1 and #2, updating build toolchain and dependencies
@darosh darosh closed this as completed Sep 3, 2019
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

No branches or pull requests

2 participants