Re: Java Generics

2018-10-13 Thread Jonathan Valliere
I updated the test suite this morning. There is definitely a correlation to performance and invokeinterface, however BakedGenericAbstractTest is using invokevirtual and is actually 2x as expensive as invokeinterface in that test. On Fri, Oct 12, 2018 at 4:29 AM Emmanuel Lécharny wrote: > > >

Re: Java Generics

2018-10-12 Thread Emmanuel Lécharny
Le 11/10/2018 à 19:03, Jonathan Valliere a écrit : > One explaination I came up was that Java is performing a full upcast when > encountering the generic-based interface. Unchecked and checked genetics > perform identically. Here is the bytecode for the strictMethod() : 0: aload_0 1:

Re: Java Generics

2018-10-11 Thread Jonathan Valliere
One explaination I came up was that Java is performing a full upcast when encountering the generic-based interface. Unchecked and checked genetics perform identically. Because the generics are fully removed at compile time; Java may be forced to do full type casting every time the method is

Re: Java Generics

2018-10-11 Thread Emmanuel Lécharny
Thanks, Jonathan, Le 11/10/2018 à 18:07, Jonathan Valliere a écrit : > I was having a conversation with a colleague last week about the cost of > automatic casting due to the use of generics in java; so, I decided to > write a benchmark. Since everyone wants their networking code to run as >

Java Generics

2018-10-11 Thread Jonathan Valliere
I was having a conversation with a colleague last week about the cost of automatic casting due to the use of generics in java; so, I decided to write a benchmark. Since everyone wants their networking code to run as fast as possible, I thought I would share it with all of you. Feel free to