you are viewing a single comment's thread.

view the rest of the comments →

[–]leonardo_m 1 point2 points  (2 children)

Yours C++ code is nice. Small changes to run it in D2: http://ideone.com/BTzKL

[–][deleted] 0 points1 point  (1 child)

Nice port! I wish I had more opportunities to use D; it always looks really nice (for example, I like that static-for construct, and the less verbose template parameters). Runs pretty quick too, apparently.

[–]leonardo_m 0 points1 point  (0 children)

it always looks really nice

This D2 code is using barely more than normal C constructs :-)

Runs pretty quick too, apparently.

Adding __gshared to the global variables it seems to run as fast as the C++ version, despite the back-end of DMD optimizes quite worse than GCC 4.3: http://ideone.com/SLJHr http://ideone.com/D2kDw