[PATCH v3] Make fprintf() function to multithread-safe
Peng Haitao
penght@cn.fujitsu.com
Wed Aug 1 01:57:00 GMT 2012
Hi, Andreas
On 07/24/2012 10:05 PM, Andreas Jaeger wrote:
> On Tuesday, July 24, 2012 15:36:52 Peng Haitao wrote:
>> [...]
>>> Performance counter stats for './fprintf':
>>
>> 30,029,273,153 instructions # 0.00 insns per
>> cycle
>>
>> 7.533755240 seconds time elapsed
>> [...]
>> # perf stat -e instructions -- ./fprintf_new > /dev/null
>>
>> Performance counter stats for './fprintf_new':
>>
>> 39,694,838,263 instructions # 0.00 insns per
>> cycle
>>
>> 9.690116102 seconds time elapsed
>
> So, the overhead is in this case 25 per cent? That's a lot IMO.
>
The overhead is big because the libc's version is different.
The ./fprintf with libc's version is glibc-2.12-1.80.el6.x86_64
The ./fprintf_new with libc's version is glibc-2.16-ports-merge-23-gc1d0079
The test results with same libc's version have been sent to the mail list,
please check, Thanks.
--
Best Regards,
Peng
More information about the Libc-alpha
mailing list