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

reduce enum array allocation #127

Merged
merged 1 commit into from
Apr 24, 2024
Merged

Conversation

sullis
Copy link
Contributor

@sullis sullis commented Apr 23, 2024

Motivation

reduce enum array allocation

Modifications

use cached enum .values()

Additional context

https://www.gamlor.info/wordpress/2017/08/javas-enum-values-hidden-allocations/

Copy link
Member

@jungm jungm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! There's a tiny detail I noticed, when it's resolved I think we can merge this

@jungm jungm merged commit 5db4b28 into apache:master Apr 24, 2024
3 checks passed
@sullis sullis deleted the sean/enum-values-array branch April 24, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants