This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][benchtests] Use benchmark framework for strtod
- From: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Date: Thu, 05 Dec 2013 09:59:25 -0200
- Subject: Re: [PATCH][benchtests] Use benchmark framework for strtod
- Authentication-results: sourceware.org; auth=none
- References: <20131204074418 dot GP14845 at spoyarek dot pnq dot redhat dot com> <529F1811 dot 5090604 at linux dot vnet dot ibm dot com> <20131204124855 dot GT14845 at spoyarek dot pnq dot redhat dot com> <20131205053252 dot GB14845 at spoyarek dot pnq dot redhat dot com>
On 05-12-2013 03:32, Siddhesh Poyarekar wrote:
> On Wed, Dec 04, 2013 at 06:18:55PM +0530, Siddhesh Poyarekar wrote:
>> On Wed, Dec 04, 2013 at 09:54:57AM -0200, Adhemerval Zanella wrote:
>>> Hi Siddhesh,
>>>
>>> With this patch, I'm seeing some compilations errors when issuing 'make bench':
>>>
>> Sorry, I think I forgot to explicitly mention that this patch needs
>> the following patch too:
>>
>> https://sourceware.org/ml/libc-alpha/2013-12/msg00122.html
>>
>> The compilation error looks like something I'd see if this patch
>> wasn't included. Could you please confirm?
> I have now upstreamed the patch I mentioned above, so you just need to
> rebase and verify if the strtod benchmark builds for you.
>
> Thanks,
> Siddhesh
>
Hi Siddhesh,
It is working now, but with your current patch the results are now squashed into a single value.
For instance, now I'm getting:
strtod(): ITERS:9.6174e+07: TOTAL:25951.3Mcy, MAX:4207.27cy, MIN:54.375cy, 3705.94 calls/Mcy
Instead of:
Input 1e308 : 916.607
Input 100000000e300 : 539.083
Input 0x1p1023 : 124.646
Input 0x1000p1011 : 159.497
Input 0x1p1020 : 123.636
Input 0x0.00001p10401e-307 : 104.093
Input 0.000001e-301 : 951.208
Input 0.0000001e-300 : 932.807
Input 0.00000001e-299 : 943.378
[...]
The idea of having multiple outputs is because strtod may use different internal and thus different
values depending of the inputs. When I ported the MPN implementation to GLIBC I found out its
routines are only heavily used for some kind of floating point inputs.