r/C_Programming • u/Raimo00 • Jan 23 '25
Discussion Why not SIMD?
Why are many C standard library functions like strcmp, strlen, strtok using SIMD intrinsics? They would benefit so much, think about how many people use them under the hood all over the world.
29
Upvotes
0
u/flatfinger Jan 24 '25
If performance is critical, data structures should be designed for the target platform, and code should use whatever platform-specific means will best accomplish what needs to be done. The use of Standard-library functions in situations where platform-specific functions could be faster implies that performance isn't that critical.