[phobos] Building generated/osx/release/32/unittest/std/string takes 400+ seconds on OSX
Andrei Alexandrescu
andrei at erdani.com
Sat Sep 24 16:55:19 PDT 2011
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"))));
}
}
More information about the phobos
mailing list