This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add math benchmark latency test
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: Siddhesh Poyarekar <siddhesh at gotplt dot org>, Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Cc: nd at arm dot com
- Date: Wed, 16 Aug 2017 14:43:31 +0100
- Subject: Re: [PATCH] Add math benchmark latency test
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- References: <DB6PR0801MB20530E94B6016F1E3F7CEDEC83820@DB6PR0801MB2053.eurprd08.prod.outlook.com> <0e008f2e-f41a-1bb8-803c-2f798e2c3541@gotplt.org>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 16/08/17 14:07, Siddhesh Poyarekar wrote:
> On Wednesday 16 August 2017 04:55 PM, Wilco Dijkstra wrote:
>> This patch further improves math function benchmarking by adding a latency
>> test in addition to throughput. This enables more accurate comparisons of the
>> math functions. The latency test works by creating a dependency on the previous
>> iteration: func_res = F (func_res * zero + input[i]). The multiply by zero avoids
>> changing the input.
>>
...
>> - json_attr_double (&json_ctx, "duration", d_total_s);
>> - json_attr_double (&json_ctx, "iterations", d_total_i);
>> if (is_bench)
>> - json_attr_double (&json_ctx, "throughput", d_total_s / d_total_i);
>> + {
>> + json_attr_double (&json_ctx, "throughput", throughput / d_total_i);
>
> I didn't notice this earlier, but shouldn't throughput be
> iterations/cycle and not the other way around? That is, throughput
> should be the inverse of latency.
yes in principle the throughput is number of calls/unit time,
but the inverse of that is just as useful, it's the rate at
which calls can be issued and then it can be easily compared
to the latency number, but i guess printing it as calls/sec
would work too.