C99 and GMP tuning

Hans Åberg haberg-1 at telia.com
Mon Apr 9 20:14:50 UTC 2018

> On 9 Apr 2018, at 17:45, Torbjörn Granlund <tg at gmplib.org> wrote:
> sav_ix at ukr.net writes:
>  After moving to C99, can GMP Developers consider to drop use of non
>  portable 'getrusage()', 'rusage' etc. in favor of 'clock()'? The
>  advantage in addition to portability could be that the running time of
>  the tuning be shortened (need be verified).
> This seems completely unrelated to C90 vs C99.
> I also think you're wrong.  If you are aware of a specific system where
> clock() is more accurate than getrusage, then let us know.  But please
> don't base that on beliefs, instead check that it is actually the case.

This page [1] says that POSIX clock_gettime [2] with clock id CLOCK_PROCESS_CPUTIME_ID offers better resolution than clock.

1. http://en.cppreference.com/w/cpp/chrono/c/clock
2. http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_getres.html

More information about the gmp-discuss mailing list