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

Sean Kelly sean at invisibleduck.org
Wed Oct 2 10:46:09 PDT 2013


On Oct 1, 2013, at 11:13 AM, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> 
> I don't particularly like the fact that we're forced to duplicate std.utf stuff 
> in druntime in order to handle foreach, but I don't know of any way around 
> that short of moving std.utf (or some portion of it) into druntime. It's 
> pretty much the same problem that we have with the fact that std.traits isn't 
> available in druntime, except that the implementation for decode and stride 
> are a bit more complicated than most traits.

Unciode is such an intrinsic part of the language that I think a strong argument could be made for putting basic UTF handling into core.  I've considered it in the past, but never spent the time to sort out a minimal set of functionality and appropriate API.  I agree that duplicating these function inside rt.util is undesirable.


More information about the D-runtime mailing list