handful and interval

David Nadlinger see at klickverbot.at
Mon Sep 3 11:01:30 PDT 2012


On Monday, 3 September 2012 at 14:04:18 UTC, Andrei Alexandrescu 
wrote:
>> A sufficiently smart compiler (tm) could
>> optimize this to a efficient string "prefix switch statement" 
>> just as well…
>
> I agree. But then 
> http://c2.com/cgi/wiki?SufficientlySmartCompiler.

This is exactly my point: My feeling is that the increased 
complexity by introducing a second syntax resp. a new special 
case (i.e. among) for such a simple operation is only worth it if 
it leaves no reason to revert to a hand-written replacement for 
performance reason, and I'm not sure if the signature taking 
runtime parameters is enough for that (without assuming such a 
sufficiently smart compiler).

David


More information about the Digitalmars-d mailing list