[Issue 7442] ctRegex!`\p{Letter}` uses a lot memory in compilation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Mar 14 11:53:03 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7442
--- Comment #12 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2013-03-14 11:53:00 PDT ---
(In reply to comment #0)
> Test case:
>
> ------------------------
> import std.regex;
> enum bug7442 = ctRegex!`\p{Letter}`;
> ------------------------
>
> Compile with `dmd -c test7442.d`. DMD will very quickly use up all system
> memory. (I'll try to reduce the test case later.)
Now this compiles for me in 2.063:
import std.regex;
enum bug7442 = ctRegex!`\p{Letter}`;
------------------------
Total time (ms): 11197.2
And even both cases combined:
import std.regex;
enum bug7442 = ctRegex!`\p{Letter}`;
void wcpx(string fn)
{
enum ctr = regex(r"\w+","g");
}
------------------------
Total time (ms): 17443.3
The latter takes around 600Mb virtual memory as measured on Win7 x64 with
32-bit executable. DMD lately has been tweaked to actually use up to 2GB of
memory on win32.
And the time is not all that bad.
Should we close this as the root case of improving dmd's CTFE memory footprint
is covered elsewhere? Just asking.
--
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