C99 and GMP tuning

Vincent Lefevre vincent at vinc17.net
Tue Apr 10 13:43:08 UTC 2018


On 2018-04-10 15:08:43 +0200, Hans Åberg wrote:
> On MacOS 10.13.4, I get:
> 
> $ ./clock-times clock 1.000000001
> Clock units per second: 1000000
> Number of calls: 1171029 (1.000002 s)
> Number of calls: 2347811 (2.000001 s)
> Number of calls: 3516471 (3 s)
> 
> $ ./clock-times getrusage 1.000000001
> Number of calls: 2350134 (1.000001 s)
> Number of calls: 4706277 (2.000001 s)
> Number of calls: 7059820 (3 s)
> 
> $ ./clock-times CLOCK_PROCESS_CPUTIME_ID 1.000000001
> Clock resolution (id 12 [CLOCK_PROCESS_CPUTIME_ID]): 1000 ns
> Number of calls: 1163761 (1.000001 s)
> Number of calls: 2330127 (2.000002 s)
> Number of calls: 3492651 (3 s)

About these, you should recompile clock-times with -DNSEC=20
(or perhaps more) to see at which frequency you get ".000002"
instead of ".000001". It is probable that these 3 functions
are actually about the same there.

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


More information about the gmp-discuss mailing list