[Issue 10866] Regression (2.064 git-head) Massive compiler slowdown
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 12 15:19:38 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10866
--- Comment #17 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2013-09-12 15:19:35 PDT ---
(In reply to comment #16)
> I think that it's not the tables but rather the subtle thing is that
> a lot of tempalted code runs std.format and then we have this:
>
> private void formatChar(Writer)(Writer w, in dchar c, in char quote)
> {
> import std.uni : isGraphical;
>
> if (std.uni.isGraphical(c))
> {
> if (c == quote || c == '\\')
> put(w, '\\'), put(w, c);
> else
> put(w, c);
> }
>
> That bounces as at CTFE to this:
>
> bool isGraphical(dchar c)
> {
> static immutable graphicalTrie = asTrie(graphicalTrieEntries);
> return graphicalTrie[c];
> }
>
> And that hurts as there is no longer ASCII only case in place
> and said trie look up is only fast at R-T with proper inlining.
Well that's not the case with simple import std.stdio + empty main.
I think our only way out is to isolate the unicode_tables is separate
compilation + ~ .di file so that compiler doesn't have to re-tokenize 1.3M
file.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list