Optimized string routines - libastring

libastring (in the /opt/arm/<armpl_dir>/lib directory) provides a set of replacement string.h functions which are optimized for AArch64: bcmpmemchrmemcpymemmovememsetstrchrstrchrnulstrcmpstrcpystrlenstrncmpstrnlen. Linking to libastring ahead of libc ensures use of these optimized functions.

As with the libamath library, to provide an enhanced performance by default, Arm C/C++ Compiler automatically links to the libastring library before it links to libc. You do not have to supply any specific compiler options to initiate this behavior.

When using libastring with the GCC compiler, you must explicitly link to the libastring library to benefit from the performance increase. For example:

gcc code_with_string_routines.c -lastring
gfortran code_with_string_routines.f -lastring

Previous Next