Re: [PATCH 3/3] lib: vsprintf: added a put_dec() test and benchmark tool

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Denys Vlasenko
Date: Thursday, August 5, 2010 - 10:10 pm

On Friday 06 August 2010 00:38, Michal Nazarewicz wrote:


(1) Why exec?
(2) Add -Wall, you'd be surprised



What this function do? Looks cryptic. In my testing, it picks 0
quite often.



Can you size the array safely, without assuming that long long
is no wider than 64 bits?



I'd add memset(buf1, 77, sizeof(buf1)) before test



Why is this "correction" thing needed? I looked at the entire machinery
and I see no reason to have it.



You have variable named i, you pass it as macro parameter,
but macro has local variable named i too.
Is it an International Obfuscated C Code Contest entry?





"%llu" fmt is for unsigned long long, not uint64_t.



Here a lot of CPU time is taken by rand() calls. Also, you use different
values for different functions, which is wrong.


-- 
vda
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2/3] lib: vsprintf: optimised put_dec() for 32-bit ..., Michal Nazarewicz, (Thu Aug 5, 3:38 pm)
Re: [PATCH 3/3] lib: vsprintf: added a put_dec() test and ..., Denys Vlasenko, (Thu Aug 5, 10:10 pm)
Re: [PATCH 1/3] lib: vsprintf: optimised put_dec_trunc() a ..., Michal Nazarewicz, (Thu Aug 5, 11:56 pm)
Re: [PATCH 2/3] lib: vsprintf: optimised put_dec() for 32- ..., Michal Nazarewicz, (Fri Aug 6, 12:08 am)
Re: [PATCH 3/3] lib: vsprintf: added a put_dec() test and ..., Michał Nazarewicz, (Fri Aug 6, 1:34 am)
Re: [PATCH 2/3] lib: vsprintf: optimised put_dec() for 32- ..., Michał Nazarewicz, (Fri Aug 6, 1:54 am)
Re: [PATCH 3/3] lib: vsprintf: added a put_dec() test and ..., Michal Nazarewicz, (Fri Aug 6, 1:58 pm)