std.regex is fat

Alex sascha.orlov at gmail.com
Fri Oct 12 13:42:34 UTC 2018


On Friday, 12 October 2018 at 13:25:33 UTC, Chris Katko wrote:
> Like, insanely fat.
>
> All I wanted was a simple regex. The second include a regex 
> function, my program would no longer compile "out of memory for 
> fork".
>
> /usr/bin/time -v reports it went from 150MB of RAM for D, 
> DAllegro, and Allegro5.
>
> To over 650MB of RAM, and from 1.5 seconds to >5.5 seconds to 
> compile. Now I have to close all my Chrome tabs just to compile.
>
> Just for one line of regex. And I get it, it's the overhead of 
> the library import, not the single line. But good gosh, more 
> than 3X the RAM of the entire project for a single library 
> import?
>
> Something doesn't add up!

Hm... maybe, you run into this:
https://forum.dlang.org/post/mailman.3091.1517866806.9493.digitalmars-d@puremagic.com



More information about the Digitalmars-d-learn mailing list