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 > fast as possible, I thought I would share it with all of you. > > Feel free to peer-review the code. > https://github.com/jon-valliere/jmh-generics-benchmark
Running this benchmark, I get a 10x slower run when using generic compared to the non-generic version (3G op/s vs 300M op/s) That beaing said, Generic are't supposed to have any impact on java code, because it's all removed by the compiler, so there must be something weirdo going on. It would be interesting to check the generated bytecode to see the difference. -- Emmanuel Lecharny Symas.com directory.apache.org
pEpkey.asc
Description: application/pgp-keys
