On 12/7/17 1:26 PM, Daniel Kozak wrote:
This is not about write the best D code. It is about similar code to
perform same. However when I looked at the D code it is not good port of
C/C++. He made many mistakes which make it slower than C/C++ counterpart.
One example is read_one_line function:
C++: https://github.com/jpakkane/pkg-config/blob/cpp/parse.cpp#L60
D: https://github.com/jpakkane/pkg-config/blob/d/parse.d#L57
Wow, interesting that D uses less memory with that continue new char[1]
in there!
Kind of funny that he didn't just use FILE * directly, it's totally
available in D :)
-Steve