logoalt Hacker News

samshineyesterday at 6:36 PM2 repliesview on HN

I haven't seen a strcpy use a scalar loop in ages. Is this an ARM thing?


Replies

amlutotoday at 7:16 AM

Modern x86 CPUs have actual instructions for strcpy that work fairly well. There were several false starts along the way, but the performance is fine now.

show 1 reply
manwe150yesterday at 7:38 PM

The spec and some sanitizers use a scalar loop (because they need to avoid mistakenly detecting UB), but real world libc seem unlikely to use a scalar loop.