JDK 8 RFR for JDK-7185456 : (ann) Optimize Annotation handling in java/sun.reflect.* code for small number of annotationsC (original) (raw)
Joel Borggrén-Franck joel.franck at oracle.com
Wed Mar 27 13:00:58 UTC 2013
- Previous message: JDK 8 RFR for JDK-7185456 : (ann) Optimize Annotation handling in java/sun.reflect.* code for small number of annotationsC
- Next message: JDK 8 RFR for JDK-7185456 : (ann) Optimize Annotation handling in java/sun.reflect.* code for small number of annotationsC
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Peter,
On 03/27/2013 01:31 PM, Peter Levart wrote:
I also don't know whether having LinkedHashMap instead of plain HashMap is necessary, since it is initialized with defaults from plain HashMap (which is hashCode % capacity ordered) and only some of defaults are overridden in parsing loop in general. For example, having this annotation:
@interface Ann { String one(); String two() default "2"; } and usage: @Ann(one = "1") ...toString will print: @Ann(two = "2", one = "1")
While there perhaps is no natural ordering between the sets of default elements and non-default elements you probably want an order following source as closely as possible among the non-default elements.
cheers /Joel
- Previous message: JDK 8 RFR for JDK-7185456 : (ann) Optimize Annotation handling in java/sun.reflect.* code for small number of annotationsC
- Next message: JDK 8 RFR for JDK-7185456 : (ann) Optimize Annotation handling in java/sun.reflect.* code for small number of annotationsC
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]