Hi Yuao,

c8ef wrote:
I'm currently working on implementing the `split` procedure, which was added in Fortran 2023.

I am wondering whether we should implement it – for kind=1 (and at least  for set len=1) by a call to BUILT_IN_MEMCHR / BUILT_IN_MEMRCHR. For set len > 1, a loop around it has to be generated, and for kind=4, it could be implemented manual walk of the array elements (+ another loop for set len > 1).

Doing so permits more optimization opportunities and avoids a function call. Downside is a larger code size due to the loops, albeit for BUILT_IN_MEM(R)CHR (kind=1, set len=1) it still permits a lib call.

Tobias

Reply via email to