Tried C++ to D. Wrong result.

Dmitry dmitry at indiedev.ru
Mon Nov 27 17:21:05 UTC 2017


On Monday, 27 November 2017 at 17:01:29 UTC, Adam D. Ruppe wrote:
> In the C++ version they are declared
>
> std::vector<size_t> pending;
> std::vector<size_t> pendingNext;
Ah, indeed. I thought that

pending.reserve(N);
pendingNext.reserve(N);

initializes them (last time I used C++ about 17 years ago...)

> I suspect you will get better results by just making the D decls
> and leave the rest of the code the same and see what happens.
It fixed a delay (you can see it on video I posted before), but 
result is same.


More information about the Digitalmars-d-learn mailing list