Why is glibc's fwrite_unlocked faster than the write syscall?
Name:
Anonymous2011-01-06 13:03
>>1
Because it does not lock the global mutex on the file object. Locking a global resource has overhead. However, you should probably not use the unlocked versions of those functions. It is not thread/process-safe.