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

v1.1.5 minor performance bump #7

Merged
merged 2 commits into from
Apr 26, 2024
Merged

v1.1.5 minor performance bump #7

merged 2 commits into from
Apr 26, 2024

Conversation

reececomo
Copy link
Owner

What's changed?

  • Moved from array -> maps
    • O(n) tick (no change)
    • O(1) insertion / remove, previously O(n)
    • O(1) lookups on running actions (i.e. node.action('myKey') and node.hasActions()), previously O(n)
    • One isPaused / getSpeed walk per target per tick, previously O(2n * t)
    • Added tests for existing addWithKey() behaviors.

@reececomo reececomo merged commit c748555 into main Apr 26, 2024
2 checks passed
@reececomo reececomo deleted the v1.1.5-perf branch August 5, 2024 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant