[foreign] Some benchmarks for Foreign vs JNA (vs pure java implementation)

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Tue Mar 19 11:44:55 UTC 2019


On 18/03/2019 12:47, Lev Serebryakov wrote:
> On 13.03.2019 19:07, Maurizio Cimadamore wrote:
>
>
>> http://cr.openjdk.java.net/~mcimadamore/panama/fftw-bulk.txt
>>
>> Seems like Panama is marginally faster than JNA. In the FFTOnly case the
>> speedup is bigger, and I suspect you were not seeing that on Windows
>> because Windows doesn't have the direct invoker backend optimization.
>> But when LinkToNative will be merged in, the numbers should improve
>> across the board, Windows included (at which point we can bin the direct
>> invoker backend which only really works on Linux/Mac).
>>
>> I'll wait for your input, but it seems that adding fast paths for doing
>> bulk array copy is the way to go for cases like these.
>   Maybe, it is too late, but, yes, bulk load/store helps a lot. Now
> Panama is fastest on Windows too.
>
>   I've updated by google sheet with new data.

Thanks! Never too late :-)

My benchmark were uber limited, as I only tested one flavor of the 
input, so I might well have got something wrong.

Glad to know that the bulk copy is pulling its weight! Do you have a new 
link for the spreadsheet? I still seem to see the old numbers.

Maurizio

>


More information about the panama-dev mailing list