RFR: 7903585: Revisit variadic support [v2]
Jorn Vernee
jvernee at openjdk.org
Fri Dec 1 14:34:03 UTC 2023
On Fri, 1 Dec 2023 14:13:56 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Not sure what you mean. The holder class is for the base descriptor. We could stick that into the invoker interface instead, but I'm not sure why a record would be better than an interface? Do we want users to be able to access the underlying MethodHandle?
>
> Sorry, I guess what I'm trying to say is that:
> * the benefit for caching the base descriptor is low;
> * the real benefit would be in treating the final (specialized) method handle as a constant
>
> To do the latter, given we can't use stable fields, the only way to get there is to use a record. So, if we care about maximum performance, we should use a record. If we don't care, an interface is fine. In both cases, I don't think there's much to gain in having an extra holder class here.
Okay, I can drop the holder class. (see other thread for discussion on record vs lambda/interface)
-------------
PR Review Comment: https://git.openjdk.org/jextract/pull/149#discussion_r1412172081
More information about the jextract-dev
mailing list