Skip to content

Conversation

@sparr
Copy link

@sparr sparr commented Sep 23, 2016

The built-in method uses _.filter().length which wastefully creates a whole new list in memory to measure the length of. The quick fix was to use _.sum(), but I went with a whole custom function so that I could short circuit after the first damaged part and return sooner on damaged creeps.

@sparr
Copy link
Author

sparr commented Sep 23, 2016

thanks to @doboross on Slack for working on this with me

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