Hash :
fe33f943
Author :
Date :
2024-06-14T23:11:05
timespec-add,timespec-sub: tune * lib/timespec-add.c (timespec_add): * lib/timespec-sub.c (timespec_sub): Simplify by detecting overflow when the two overflow bits of the underlying operation differ. This avoids some gotos and labels and conditional branches; GCC 14 x86-64 now generates just one conditional branch for the resulting code. Idea stolen from my recent changes to the glibc manual’s time chapter. * modules/timespec-add (Depends-on): * modules/timespec-sub (Depends-on): Add stdbool.
Description:
Subtract timespec values.
Files:
lib/timespec-sub.c
Depends-on:
c99
intprops
stdbool
stdckdint
timespec
configure.ac:
Makefile.am:
lib_SOURCES += timespec-sub.c
Include:
"timespec.h"
Link:
License:
GPL
Maintainer:
Paul Eggert, Jim Meyering