Re:How Many Type Parameters Can a Java Method Have?
by cobbzilla on Monday April 29, 2019 @11:55AM
(#19779513)
Wow -- that is some ugly code. Why couldn't they use a single varargs method declaration? Does this code need to support older Java versions that lack varargs support?
[ Parent
| on HN ]
Re:How Many Type Parameters Can a Java Method Have?
by Someone on Monday April 29, 2019 @12:36PM
(#19779918)
Read the code comments. ”The purpose is the reduction of the size of the bytecode.”
Re:How Many Type Parameters Can a Java Method Have?
by lokedhs on Monday April 29, 2019 @12:06PM
(#19779613)
It may be a performance hack. Varargs results in an array being allocated. I've seen this trick in the past, but they usually stopped at a handful of arguments and let the rest be handled by varargs.
Re:How Many Type Parameters Can a Java Method Have?
by usrusr on Monday April 29, 2019 @07:32PM
(#19783638)
Groovy is chock-full of absurd little microoptimizations that will forever fail to make even the tiniest dent in the general overhead relative to java. For several years there was even an "assume equality of hashes match" shortcut hidden in certain set operation code paths.