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

fix: optimize getBounds method #91

Merged
merged 1 commit into from
Dec 4, 2023
Merged

Conversation

DeltaZN
Copy link
Contributor

@DeltaZN DeltaZN commented Dec 4, 2023

Seems like Object access is still faster than Map in Chrome.
On 4000 ms window I got the following results:

  • without optimizations: getBounds() time - 200ms

  • with map & optimized access: getBounds() time - 120ms

  • with object & optimized access: getBounds() time - 80ms

@disyakidneyshot disyakidneyshot merged commit 8e08125 into master Dec 4, 2023
2 checks passed
@disyakidneyshot disyakidneyshot deleted the optimize-get-bounds-2 branch December 4, 2023 08:18
@disyakidneyshot disyakidneyshot added the enhancement New feature or request label Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants