FreeBuilder icon indicating copy to clipboard operation
FreeBuilder copied to clipboard

Evaluate optimizability of internal EnumSet

Open alicederyn opened this issue 6 years ago • 1 comments

Allocating objects in hot loops can cause unwanted GC and memory pressure if the JVM cannot optimize them away with escape analysis. We use an EnumSet (to store which properties remain unset) versus bitwise operations for readability, but we could achieve similar readability by moving the bitwise logic into the generated Property enum, if there is any benefit.

alicederyn avatar Jan 25 '19 09:01 alicederyn

This would have to be done with a microbenchmark library like https://github.com/alicep-org/benchmark

alicederyn avatar Jan 25 '19 09:01 alicederyn