Can you shrink it further?

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 11 03:01:41 PDT 2016


On Tuesday, 11 October 2016 at 09:45:11 UTC, Temtaime wrote:
>
> Sorry this was also a type in the code.
>
> void popFront7(ref char[] s) @trusted pure nothrow
> {
>   import core.bitop;
>   auto v = 7 - bsr(~s[0] | 1);
>   s = s[v > 6 ? 1 : (v ? (v > s.length ? s.length : v) : 1)..$];
> }
>
> Please check this.

162 us


More information about the Digitalmars-d mailing list