bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/32844] EnumSet causes code to be miscompiled


From: robilad at kaffe dot org
Subject: [Bug classpath/32844] EnumSet causes code to be miscompiled
Date: 23 Jul 2007 15:18:07 -0000


------- Comment #5 from robilad at kaffe dot org  2007-07-23 15:18 -------
Thanks for the review, Andy, I'll commit the patch to classpath. Someone else
will have to commit it for gcj.

On IRC I said I saw two possible optimizations:
a) use a cache for allOf and noneOf, since those sets stay the same for an enum
class.
b) use a long rather than a long[] for the bitset where the number of enums in
the set is less than 64. That would shave off the array bounds checking &
access costs for most enum sets, I think.

The latter optimization is hinted at in the Java Language Spec v3 discussion of
Enums.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32844





reply via email to

[Prev in Thread] Current Thread [Next in Thread]