I been struggling with performance issues in my app, it's a port from some VERY fast C++ code but it used enums extensively. As you might have guessed after some profiling I found that a ridiculous amount of time was spent using the Java enums, so much so that what was taking me 20ish seconds with enums is now taking less than 2 with static final ints.
So given that Java has royally raped enums to the point of being unusable, is there anything else in Java that works the same as C++ enums? Or is there a pre-processor in Java that I could use to make macros to create pseudo enums?
I have several enums with over 50 values in each and it scares me how unsafe and time consuming it would be to have to manually convert them all to static final ints