[foreign-memaccess+abi] RFR: Improve strlen performance [v4]
Radoslaw Smogura
duke at openjdk.org
Tue Aug 15 14:40:57 UTC 2023
On Tue, 15 Aug 2023 13:49:02 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Ok, I understand you might see improved numbers. What I'm saying is that in principle this trick should not be necessary: the loop is a counted loop, and we know we're incrementing by 8 on each iteration. So the alignment check should be hoist-able as once we check the base address there's nothing more to check.
>
> So, I'd suggest to capture this in a small benchmark, and perhaps file a C2 compiler issue.
I wonder if optimisation issues can be related to using int counted loops instead of long, and using `ArraysSupport.SOFT_MAX_ARRAY_LENGTH`, maybe limit should be memory segment size. Adding large int to start can theoretically overflow long.
-------------
PR Review Comment: https://git.openjdk.org/panama-foreign/pull/862#discussion_r1294679682
More information about the panama-dev
mailing list