Thread overview
std.regex - ctRegex
Aug 25, 2012
nazriel
Aug 25, 2012
David
Aug 25, 2012
nazriel
Aug 29, 2012
Juanjo Álvarez
Aug 25, 2012
Dmitry Olshansky
August 25, 2012
Greetings.

I was using ctRegex in 2.059 without any issue, but since 2.060 came out some problems raised.

First of all:
*First read whole message before compiling*
http://dpaste.dzfl.pl/cfb9710d - takes 8senonds to compile on 8CPU Xeon with 16gb RAM, freezes my local computer - same happens to other folks on #d

Is it some kind of regression or my regexp is somehow corrupted?

Thanks in advance!
Best Regards,
Damian Ziemba
August 25, 2012
Am 25.08.2012 17:17, schrieb nazriel:
> First of all:
> *First read whole message before compiling*
> http://dpaste.dzfl.pl/cfb9710d - takes 8senonds to compile on 8CPU Xeon
> with 16gb RAM, freezes my local computer - same happens to other folks
> on #d

a ctRegex kills my computer, it makes dmd use up all my ram. But that was already the case with 2.059 (well I "just" have 4 Cores and 32 bit, with 4gb ram installed)
August 25, 2012
On Saturday, 25 August 2012 at 15:20:10 UTC, David wrote:
> Am 25.08.2012 17:17, schrieb nazriel:
>> First of all:
>> *First read whole message before compiling*
>> http://dpaste.dzfl.pl/cfb9710d - takes 8senonds to compile on 8CPU Xeon
>> with 16gb RAM, freezes my local computer - same happens to other folks
>> on #d
>
> a ctRegex kills my computer, it makes dmd use up all my ram. But that was already the case with 2.059 (well I "just" have 4 Cores and 32 bit, with 4gb ram installed)

Hmm, I had no problems with it in 2.059 on my local notebook (i5, 4gb ram, 64bit Arch Linux/Gentoo Linux)
August 25, 2012
On 25-Aug-12 19:17, nazriel wrote:
> Greetings.
>
> I was using ctRegex in 2.059 without any issue, but since 2.060 came out
> some problems raised.
>
Nice to know that it did work fine in 2.059 :)
As an author even I can't recall offhand if (and when) it did work fine w.r.t. time spent to do its unholy thing.

> First of all:
> *First read whole message before compiling*
> http://dpaste.dzfl.pl/cfb9710d - takes 8senonds to compile on 8CPU Xeon
> with 16gb RAM, freezes my local computer - same happens to other folks
> on #d

Well \w is a huge character set (see Unicode) at run-time making optimal bit 2-level trie out of it is okay and takes only few ms.
At CTFE though it takes a ton of RAM and up to few minutes to do so.

>
> Is it some kind of regression or my regexp is somehow corrupted?

Well there are no significant changes to std.regex that I did since 2.058. Now the compiler is changing and so does CTFE, and so do some Phobos things. I recall there even was a snapshot of dmd that doesn't eat RAM like crazy at CTFE (maybe yours 2.059?).
Too bad I can't recall the exact commit.


-- 
Olshansky Dmitry
August 29, 2012
Yes, I don't now about 2.059 (I've just recently make my comeback to D) but very simple ctRegex-es take pretty quickly all the memory (6GB) of my laptop.

"David" <d@dav1d.de> wrote in message news:k1aqf9$q76$1@digitalmars.com...
> Am 25.08.2012 17:17, schrieb nazriel:
>> First of all:
>> *First read whole message before compiling*
>> http://dpaste.dzfl.pl/cfb9710d - takes 8senonds to compile on 8CPU Xeon
>> with 16gb RAM, freezes my local computer - same happens to other folks
>> on #d
>
> a ctRegex kills my computer, it makes dmd use up all my ram. But that was already the case with 2.059 (well I "just" have 4 Cores and 32 bit, with 4gb ram installed)