about Enum.values() memory allocation
nezih yigitbasi
nezihyigitbasi at gmail.com
Wed Jul 25 05:23:57 UTC 2018
Hi,
I recently noticed in our app that Enum.values() allocates a significant
amount of memory when called in a tight loop as it clones the constant
values array (which is probably for immutability, and I can understand
that). I found that the same issue has been discussed back in 2012:
http://mail.openjdk.java.net/pipermail/compiler-dev/2012-March/004210.html
Are there any plans to address this issue going forward?
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180724/03b50697/attachment.html>
More information about the compiler-dev
mailing list