On Tuesday, 19 July 2016 at 10:07:11 UTC, Atila Neves wrote:
On Tuesday, 19 July 2016 at 02:54:37 UTC, Saurabh Das wrote:
Posted on Atila's blog yesterday:
https://atilanevesoncode.wordpress.com/2016/07/18/c-is-not-magically-fast-part-2/
So, about D vs C++ there... last night for reasons I forget I
tried replacing std::string with const char* in the C++
version, and then it got faster than D. I don't know why.
At first I thought std::string was being copied instead of
being moved, but some static_asserts made me doubt that. Either
way, there's no good reason I can think of for C++ to magically
speed up for const char*. Hmm :(
Atila
What is the sizeof(Foo) for all of the cases?
What does "charPtr < charPtr" do in C++ compared to std::string?
Cheers, Jakob.