Parallel Rogue-like benchmark

Marco Leise Marco.Leise at gmx.de
Thu Nov 7 05:33:40 PST 2013


Am Thu, 07 Nov 2013 14:19:00 +0100
schrieb "bearophile" <bearophileHUGS at lycos.com>:

> > http://dpaste.dzfl.pl/d37ba995
> 
> That gives me 83 cloc (http://cloc.sourceforge.net ) lines of 
> code, so if you submit that code to the benchmark site, make sure 
> the line count (currently  	108, despite cloc gives me 101 on it) 
> too gets updated.
> 
> Bye,
> bearophile

foreach (immutable xi; r.x .. r.x + r.w + 1)

What the heck?! I didn't know that even compiles. :)
About the UPPERCASE_CONSTANTS: I know we tend to use camelCase
for them, too. It's just a personal preference to have global
constants in uppercase.
If you want it submitted please go ahead. My objection is that
you condensed the code too much to create a small SLOC in
comparison to e.g. C++ and moved away from the original coding
style of the benchmark that made SLOC somewhat comparable.

Btw. I also wrote a new algorithm for the given problem, that
gives deterministic "full" levels without resorting to trial
and error and runs a lot faster (when compiled for 64-bit at
least):
http://dpaste.dzfl.pl/d37ba995

-- 
Marco



More information about the Digitalmars-d mailing list