std.regex is fat

Chris Katko ckatko at gmail.com
Fri Oct 12 13:25:33 UTC 2018


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!




More information about the Digitalmars-d-learn mailing list