|
Boost : |
From: Eric Niebler (neric_at_[hidden])
Date: 2002-10-24 19:25:37
"Andrei Alexandrescu" <andrewalex_at_[hidden]> wrote in message news:apa0p9
> Could anyone post the executable size generated by a run-of-the-mill
regexp
> search on a char* for Greta and Regex++? Thank you.
Without tweaking the code, I can make a GRETA executable as small as 86 Kb:
C:\src\andrei_regex\Release>andrei_regex.exe "^H.ll." "Hello, world!"
C:\src\andrei_regex\Release>echo %errorlevel%
0
C:\src\andrei_regex\Release>andrei_regex.exe "^no match$" "Hello, world!"
C:\src\andrei_regex\Release>echo %errorlevel%
-1
C:\src\andrei_regex\Release>dir andrei_regex.exe
Volume in drive C has no label.
Volume Serial Number is 8CB4-81C7
Directory of C:\src\andrei_regex\Release
10/24/2002 05:12 PM 86,016 andrei_regex.exe
1 File(s) 86,016 bytes
0 Dir(s) 86,600,318,976 bytes free
C:\src\andrei_regex\Release>type ..\main.cpp
#include "regexpr2.h"
using namespace regex;
int main( int argc, char * argv[] )
{
static rpattern_c const pat( argv[1] );
match_results_c res;
if( pat.match( argv[2], res ) )
{
return 0;
}
return -1;
}
The numbers I reported yesterday were off because I was statically linking
to the CRT, and compiling with "favor speed over size." :-P
HTH,
Eric
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk