On Sun, Apr 22, 2012 at 12:31:16PM +0200, SomeDude wrote: > On Saturday, 21 April 2012 at 14:40:00 UTC, H. S. Teoh wrote: [...] > >Hmph. I should've checked dmd memory usage when I wrote that. :-( > > > >But anyway, even on my souped up AMD hexacore system, the ctRegex > >version takes significantly longer to compile than the non-ctRegex > >version. Perhaps I should just avoid ctRegex for now (though it *is* > >an ultracool feature of std.regex). > > Well, the big problem is, even if I fall back to runtime regex, I > can't compile anymore on a Windows box with 2Gb of RAM. It's hard to > swallow...
It's my fault. I really should be using module globals for those regexes, and a module ctor (static this) for initializing them. It would be nice if the CTFE implementation was improved, though. CTFE is one of the big major features of D that I really liked. But speaking of which, are you using the latest version of dmd? 'cos I think recently there were some CTFE efficiency issues that got fixed. T -- "How are you doing?" "Doing what?"
