[Bug libstdc++/59177] steady_clock::now() and system_clock::now do not use the vdso (and are therefore very slow)

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 18 18:46:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59177

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Just install glibc 2.17 or later if you care about the speed, otherwise it is
fixing much more important problem that the clocks had ABI incompatible
settings depending on common libstdc++ configure options.  If you do have glibc
2.17 or later, clock_gettime(CLOCK_MONOTONIC, &tp); should be used (if not,
that would be a bug somewhere), but earlier glibcs have clock_gettime defined
only in librt, which is undesirable to require.



More information about the Gcc-bugs mailing list