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

Trivial: use vector::reserve to speedup squares_closer_to #45424

Merged
merged 1 commit into from
Nov 15, 2020

Conversation

Aivean
Copy link
Contributor

@Aivean Aivean commented Nov 15, 2020

Summary

SUMMARY: None

Purpose of change

Speedup squares_closer_to by reserving capacity of the resulting vector.

Before:
image

After:
image

@anothersimulacrum anothersimulacrum added [C++] Changes (can be) made in C++. Previously named `Code` Code: Performance Performance boosting code (CPU, memory, etc.) labels Nov 15, 2020
@ZhilkinSerg ZhilkinSerg merged commit f620d01 into CleverRaven:master Nov 15, 2020
@Aivean Aivean mentioned this pull request Nov 19, 2020
@Aivean Aivean deleted the speedup-squares_closer_to branch November 21, 2020 01:51
scarf005 added a commit to scarf005/Cataclysm-BN that referenced this pull request Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Performance Performance boosting code (CPU, memory, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants