[foreign-jextract] RFR: 8237573: Add a basic call overhead benchmark
Jorn Vernee
jorn.vernee at oracle.com
Wed Mar 25 22:26:53 UTC 2020
Ah, I think I only got a warning about sqrt when running before, but it
looks like abs is actually defined in stdlib.h [1]
I'll try running the benchmarks on WSL as well to see if I can
reproduce/fix locally.
Thanks,
Jorn
[1] : https://en.cppreference.com/w/c/numeric/math/abs
On 25/03/2020 22:51, Maurizio Cimadamore wrote:
> On Wed, 25 Mar 2020 21:42:48 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>
>>> Hi,
>>>
>>> Per my earlier email [1], this PR adds some basic call overhead benchmarks.
>>>
>>> 2 benchmarks are added:
>>> - CallOverhead, which measures both an empty and an identity function call.
>>> - PointsDistance, which extends the existing points benchmarks with one that measures the distance between 2 points doing
>>> the calculation is C (using a native call).
>>>
>>> The latter also shows the difference between passing a pointer to a struct, vs passing a struct by value,
>>> PointsDistance.panama_MemoryAddress and PointsDistance.panama_MemorySegment respectively.
>>> This acts as a basis to test the coming performance improvements in this area.
>>>
>>> Thanks,
>>> Jorn
>>>
>>> [1] : https://mail.openjdk.java.net/pipermail/panama-dev/2020-March/008007.html
>> test/micro/org/openjdk/bench/jdk/incubator/foreign/points/support/libPoint.c line 23:
>>
>>> 22: */
>>> 23: #include <math.h>
>>> 24:
>> Suggestion:
>>
>> #include <stdlib.h>
>> #include <math.h>
> I needed this change to make it compile on Linux (I actually need both includes).
>
> -------------
>
> PR: https://git.openjdk.java.net/panama-foreign/pull/65
More information about the panama-dev
mailing list