]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common: Use double instead of long double to improve performance 42082/head
authorChunsong Feng <fengchunsong@huawei.com>
Tue, 29 Jun 2021 03:26:07 +0000 (03:26 +0000)
committerChunsong Feng <fengchunsong@huawei.com>
Tue, 29 Jun 2021 03:26:07 +0000 (03:26 +0000)
commit58753cf50e89cc3d7169447aa83d13cd3a8c0347
tree2f9c9168e024fb6d87ee473129552891053686f4
parent566a8a9888adeeebd897cbfccb9d7c4940687571
common: Use double instead of long double to improve performance

To convert namoseconds to seconds, the precision needs to be 10,
and the precision of double is 15, which is enough to use.
On aarch64, double division uses the div instruction, while long
double uses the gcc buildin _divtf3, which has poor performance.
Therefore, use double instead of long double for better performance.

Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
src/include/utime.h