On Tuesday, 11 October 2016 at 08:44:04 UTC, Temtaime wrote: > > void popFront1(ref char[] s) @trusted pure nothrow > { > import core.bitop, std.algorithm; > auto v = bsr(~s[0] | 1); > s = s[clamp(v, 1, v > 6 ? 1 : $)..$]; > } > > Seems to be less if i'm not wrong. Yours runs with 790 us best time. bsr is a real timetaker :)