On 09/28/2014 02:23 AM, Andrei Alexandrescu wrote:
front() should follow a simple pattern that's been very successful in HHVM: small inline function that covers most cases with "if (c < 0x80)" followed by an out-of-line function on the multicharacter case. That approach would make the cost of auto-decoding negligible in the overwhelming majority of cases.Andrei
Well, we're using the same trick for already 3 years now :). https://github.com/D-Programming-Language/phobos/pull/299