[D-runtime] foreach (dchar c; s) is too slow

Jacob Carlborg doob at me.com
Wed Oct 2 00:21:28 PDT 2013



On Oct 01, 2013, at 08:13 PM, Jonathan M Davis <jmdavisProg at gmx.com> wrote:

> foreach(c; s)
>
> iterates over the code unit type of the string, which is only dchar if it's an
> array of dchar. You only get decoding and conversion to other character types
> if you explicitly give a different character type.

I thought this was changed when it was decided that Phobos should treat strings as ranges of dchars.

--
/Jacob Carlborg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d-runtime/attachments/20131002/a3cac8a5/attachment.html>


More information about the D-runtime mailing list