[Issue 18388] std.experimental.logger slow performance

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 6 22:09:24 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18388

--- Comment #8 from Arun Chandrasekaran <aruncxy at gmail.com> ---
spdlog (C++) does exactly the same thing and it is much faster as I shared the
stats earlier. It is apples to apples, IMO. So the contention is same in both
C++ and D versions.

In fact, D does much better with atomic operations.

Disabling the log statements with 8 threads and 100000000 iterations, C++
version takes

real    0m3.167s
user    0m25.215s
sys     0m0.004s


whereas D version takes

real    0m2.527s
user    0m20.124s
sys     0m0.000s

You can compare the asm at https://godbolt.org/z/JjfTyw

--


More information about the Digitalmars-d-bugs mailing list