Shanks0224 opened a new pull request, #22186:
URL: https://github.com/apache/nuttx/pull/22186

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
     
     For armv7-a, armv7-r and armv8-r:
     
     - Add ARM-state `memcmp`, `strchr`, `strchrnul`, `strncmp`, `strnlen` and
       `strrchr`. They scan a word at a time instead of a byte at a time.
     - Speed up `memmove`: the forward path copies 16 bytes per iteration with
       NEON when available, and a word at a time otherwise. The overlapping
       backward path stays a byte loop.
     - Compare 8 bytes per iteration in `memcmp` with `ldrd`.
     
     Each function has its own Kconfig option that selects the matching
     `LIBC_ARCH_*` symbol (default n).
     
     ## Impact
     
     - Opt-in only; the default configuration is unchanged.
     - No impact on the build system, documentation or hardware.
     
     ## Testing
     
     Build host: Linux x86_64.
     
     - 11976 cases over offsets, lengths and overlaps, compared with a
       byte-by-byte reference, on QEMU: qemu-armv7a (Cortex-A7) and
       qemu-armv7r (Cortex-R5F): 0 failures.
     - armv8-r (qemu-armv8r-aarch32) was only built, not run: the board does not
       start on the QEMU version used.
     - Measured on Cortex-A7 with `-icount shift=0`:
       - `memmove`, 4096 bytes x 2000: 32819 us -> 2092 us
       - `memmove`, 128 bytes x 50000: 26561 us -> 2700 us
       - `memcmp`, 4096 bytes x 2000: 16432 us -> 9265 us
       - `memcmp`, 128 bytes x 50000: 13855 us -> 8353 us
       (the overlapping backward `memmove` is unchanged).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to