Proposal for SentinelInputRange

deadalnix deadalnix at gmail.com
Wed Feb 27 22:02:31 PST 2013


On Thursday, 28 February 2013 at 05:28:47 UTC, Walter Bright 
wrote:
> On 2/27/2013 9:20 PM, deadalnix wrote:
>> If the range define empty with something like front == 
>> sentinel, the inliner
>> should kick in a reduce the whole stuff to only one read, no ?
>
>     auto c = front;
>     if (c == sentinel || c == XX)
>
> is two reads. This may not seem important, but when you want 
> high speed, it can halve it.

Don't you have to check for both all the time ? You have to check 
for the sentinel anyway.


More information about the Digitalmars-d mailing list