C99 and GMP tuning
Hans Åberg
haberg-1 at telia.com
Tue Apr 10 13:08:43 UTC 2018
> On 10 Apr 2018, at 14:27, Vincent Lefevre <vincent at vinc17.net> wrote:
>
> First, I've attached a new version of my clock-times.c program
> (note: it was initially written to measure the performance of
> the time functions, but it can also be used to get resolution
> and accuracy information by providing a second argument, like
> 1.000000001).
> Here's an example, on a Debian GNU/Linux 8 (jessie) machine:
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)
$ ./clock-times CLOCK_THREAD_CPUTIME_ID 1.000000001
Clock resolution (id 16 [CLOCK_THREAD_CPUTIME_ID]): 1 ns
Number of calls: 1461869 (1.000000547 s)
Number of calls: 2916869 (2.000000449 s)
Number of calls: 4381171 (3.000000638 s)
More information about the gmp-discuss
mailing list