On 9/24/11 4:25 PM, Jonathan M Davis wrote:
My guess would be that it has to do with the foreach loops over TypeTuples
that std.string uses to generate a number of its tests, but I don't know.
The test of tr is the culprit (shown at the bottom of this). It does a
triple nested loop over string types.
Jonathan, did you time using the latest compiler? Walter, did you enable
the GC for OSX too?
Should we disable this test, reduce it, or have Walter look into
improving the compiler?
Thanks,
Andrei
unittest
{
debug(string) printf("std.string.tr.unittest\n");
import std.algorithm;
foreach(S; TypeTuple!(char[], const(char)[], immutable(char)[],
wchar[], const(wchar)[], immutable(wchar)[],
dchar[], const(dchar)[], immutable(dchar)[]))
{
foreach(T; TypeTuple!(char[], const(char)[], immutable(char)[],
wchar[], const(wchar)[], immutable(wchar)[],
dchar[], const(dchar)[], immutable(dchar)[]))
{
foreach(U; TypeTuple!(char[], const(char)[], immutable(char)[],
wchar[], const(wchar)[],
immutable(wchar)[],
dchar[], const(dchar)[],
immutable(dchar)[]))
{
....
}
}
auto s = to!S("hello world");
static assert(is(typeof(s) == typeof(tr(s, "he", "if"))));
}
}
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos