There's a blog post from Google about this topic as well where they found that inserting bound checking into standard library functions (in this case C++) had a mere 0.3% negative performance impact on their services: https://security.googleblog.com/2024/11/retrofitting-spatial...
For people using Clang you can read more about libc++ hardening at https://libcxx.llvm.org/Hardening.html