]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common: Use double instead of long double to improve performance 51316/head
authorChunsong Feng <fengchunsong@huawei.com>
Tue, 29 Jun 2021 03:26:07 +0000 (03:26 +0000)
committerluo rixin <luorixin@huawei.com>
Tue, 2 May 2023 09:42:57 +0000 (17:42 +0800)
commitdbe3a962b59093d169c49de398966862a875b973
tree4823972c8f7aeabfce5bcec95dc49485857ca573
parenta1be7f242eeae49013700b4f00631d0f43c6e778
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>
(cherry picked from commit 58753cf50e89cc3d7169447aa83d13cd3a8c0347)
Signed-off-by: luo rixin <luorixin@huawei.com>
src/include/utime.h