[Issue 10866] Regression (2.064 git-head) Massive compiler slowdown
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Sep 12 15:06:15 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10866
--- Comment #16 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2013-09-12 15:06:12 PDT ---
> > > > 9a053d97c26d763718b23d14af8ef1d10d594507 is the first bad commit
> > > > commit 9a053d97c26d763718b23d14af8ef1d10d594507
> > > > Author: Dmitry Olshansky <dmitry.olsh at gmail.com>
> > > > Date: Sat Jul 20 22:30:10 2013 +0400
> > > >
> > > > new std.uni module
> > >
> > > Perhaps it's only part of the std.uni module
> >
> > There was more than that module which was introduced, there is also
> > std/internal/unicode_tables.d, which is 1.3 MB large.
>
> Perfect but .. we really need these tables.
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.
--
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