Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You're looking at it wrong. strlcpy is defined to be slow in certain cases. The API requires it. Other interfaces may be slow today but can be improved in the future because they don't have a return value that is inconvenient. (Notably, memccpy today is typically a memchr followed by memcpy, since this is faster than a naive implementation. Obviously if it gets used more then it will get replaced with a single-pass, machine optimized implementation.)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: