[foreign] Poor performance?
Jorn Vernee
jbvernee at xs4all.nl
Mon May 20 08:30:43 UTC 2019
FWIW, I did find that setAccessible(true) + unreflectConstructor works
as well, and has the same perf.
Updated:
http://cr.openjdk.java.net/~jvernee/panama/webrevs/getstruct/webrev.03/
> In alternative
> we could always go back to a normal Unsafe.defineClass - and then
> replace constant pool patching with condy, which is gonna help anyway
> if we're going at some point to start generating bindings statically.
Actually, this is my first time hearing about this. Is there a plan to
generate bindings statically? (I guess it would save time on spinning?).
Jorn
Maurizio Cimadamore schreef op 2019-05-20 10:14:
> On 19/05/2019 16:05, Jorn Vernee wrote:
>> The bad news... since we (apparently) can't get a MethodHandle to the
>> constructor of our Struct impl class without triggering an access
>> violation (seemingly because it's a VMAC?), I had to disable the
>> access checking to get these numbers.
>
> Thanks for the tests Jorn - and yes, this is the reason why Struct
> handles have not been specialized. As Brian says, there is going to be
> a more reliable way to define anonymous classes soon. In alternative
> we could always go back to a normal Unsafe.defineClass - and then
> replace constant pool patching with condy, which is gonna help anyway
> if we're going at some point to start generating bindings statically.
>
> Maurizio
More information about the panama-dev
mailing list