https://issues.dlang.org/show_bug.cgi?id=18388
Arun Chandrasekaran changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://issues.dlang.org/show_bug.cgi?id=18388
--- Comment #12 from Robert Schadek ---
Building the string in memory will put quite some pressure on the GC.
Using a stack based array is limiting and not @safe.
formattedWrite can do more than printf.
I stayed away from allowing configurations, b
https://issues.dlang.org/show_bug.cgi?id=18388
--- Comment #11 from Arun Chandrasekaran ---
s/_logger.tracef/writeln
06-09-2018 20:05:27 vaalaham ~/code/d/std-log-benchmark
$ time ./std-log-benchmark 8 100 | tail
real0m0.975s
user0m2.067s
sys 0m2.418s
06-09-2018 20:05:29 vaalaha
https://issues.dlang.org/show_bug.cgi?id=18388
--- Comment #10 from Arun Chandrasekaran ---
s/_logger.tracef/printf/
06-09-2018 18:25:51 vaalaham ~/code/d/std-log-benchmark
$ time ./std-log-benchmark 8 100 > /dev/null
real0m0.495s
user0m1.254s
sys 0m2.100s
06-09-2018 19:02:22 v
https://issues.dlang.org/show_bug.cgi?id=18388
--- Comment #9 from Arun Chandrasekaran ---
> You need to flush after each log call. If there is a log buffer and the
> program crashes, you might not see the log line that indicates the problem
That's right, but may be worth doing on a configurati
https://issues.dlang.org/show_bug.cgi?id=18388
--- Comment #8 from Arun Chandrasekaran ---
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
https://issues.dlang.org/show_bug.cgi?id=18388
--- Comment #7 from Robert Schadek ---
I didn't say anything about api calls. That is not the problem.
The problem with the benchmark is that the threads share memory. That means
each write will, given you tested on a multicore cpu, invalidates some
https://issues.dlang.org/show_bug.cgi?id=18388
--- Comment #6 from Arun Chandrasekaran ---
> The benchmark becomes single threaded around three times for each line
> printed.
How is it a benchmark issue? I agree that three API for a single log line is
expensive. Isn't that a problem with std.ex
https://issues.dlang.org/show_bug.cgi?id=18388
Robert Schadek changed:
What|Removed |Added
CC||rburn...@gmail.com
--- Comment #5 from Robe
https://issues.dlang.org/show_bug.cgi?id=18388
--- Comment #4 from Arun Chandrasekaran ---
On the same box with ldc 1.12.0-beta1, I see that the performance has improved
by around 20%.
04-09-2018 21:06:15 vaalaham ~/code/d/std-log-benchmark
$ time ./std-log-benchmark 8 100
real0m3.958s
https://issues.dlang.org/show_bug.cgi?id=18388
--- Comment #3 from Arun Chandrasekaran ---
(In reply to anonymous4 from comment #2)
> AFAIK, default logger implementations are simplistic and are not meant to be
> very fast. Fast logging requires a bit of design and is supposed to be 3rd
> party l
https://issues.dlang.org/show_bug.cgi?id=18388
--- Comment #2 from anonymous4 ---
AFAIK, default logger implementations are simplistic and are not meant to be
very fast. Fast logging requires a bit of design and is supposed to be 3rd
party library, while std.experimental.logger provides a way to
https://issues.dlang.org/show_bug.cgi?id=18388
--- Comment #1 from Arun Chandrasekaran ---
Platform: Ubuntu 17.10 - 64 bit.
Compiler:
LDC - the LLVM D compiler (1.7.0):
based on DMD v2.077.1 and LLVM 5.0.1
built with LDC - the LLVM D compiler (1.7.0)
Default target: x86_64-unknown-linux-g
13 matches
Mail list logo