On 2012-07-13 17:03, Eric Blake wrote:
Actually, coreutils tries to use all the *_unlocked variants of stdio, since those have better speed in single-threaded programs (all but sort are single-threaded, and sort skips stdio). I do know that cygwin has putchar_unlocked, but does not have quite as many *_unlocked variants as Linux, so it may be a case where the configure logic to detect _unlocked functions went wrong and cygwin ends up using putchar instead of putchar_unlocked as a result. I'll have to look into it more.
Currently we have the four required by POSIX: getc_unlocked, getchar_unlocked, putc_unlocked, and putchar_unlocked. A little while ago I was working on the others which are available in Linux, as gcc will use them if available, but they didn't seem to make much difference to gcc's performance. I still have that work locally, so if these would be useful, I could try to finish them up.
Yaakov -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple