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

Improve Npc::getRandomStep cache #3734

Merged
merged 4 commits into from
Oct 31, 2021
Merged

Improve Npc::getRandomStep cache #3734

merged 4 commits into from
Oct 31, 2021

Conversation

ramon-bernardo
Copy link
Contributor

@ramon-bernardo ramon-bernardo commented Oct 15, 2021

Pull Request Prelude

Changes Proposed

  • Improve random step cache, remove unnecessary allocation with reserve an exact heap size

@nekiro
Copy link
Member

nekiro commented Oct 28, 2021

Or just reserve vector to size of 4 to avoid reallocations.

@nekiro nekiro mentioned this pull request Oct 28, 2021
3 tasks
@DSpeichert DSpeichert merged commit ebfbef9 into otland:master Oct 31, 2021
@ramon-bernardo ramon-bernardo deleted the npc-step-cache branch October 31, 2021 17:07
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

4 participants