std.benchmark ready for review. Manager sought after

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Apr 8 07:30:01 PDT 2012


On 4/8/12 2:02 AM, Vladimir Panteleev wrote:
> The "benchmark_relative_" prefix makes sense for function names (for
> scheduleForBenchmarking), but not so much for string literals for
> benchmark names. The string literal "benchmark_relative_file read" looks
> like the words "benchmark relative file" are grouped together, with
> "read" added on. So, my suggestion would be to wrap the
> "benchmark_relative_" prefix - when used with benchmark name strings -
> into a semantical function / enum / etc. In my example above,
> relativeBenchmark would be:
>
> string relativeBenchmark(string s) { return "benchmark_relative_" ~ s; }
>
> I suppose it can be summed up as a tradeoff between complexity (you need
> to explain both the function name usage and the relativeBenchmark
> wrapper usage) vs. code prettiness.

I understand, thanks.

Andrei


More information about the Digitalmars-d mailing list