No subject


Tue Nov 1 15:57:14 EDT 2011


mentation, which is known to be slow for some cases.<br>
<br>
On my machine, the attached example runs in 0.8 sec. Just to process one st=
ring!<br>
 =A0 $ time ./repr<br>
 =A0 =A0 =A0 real =A0 =A0 0m0.865s<br>
 =A0 =A0 =A0 user =A0 =A0 0m0.862s<br>
 =A0 =A0 =A0 sys =A0 =A0 =A00m0.002s<br>
<br>
Grep can process 100k such strings in 0.5 sec (which includes reading a 570=
MB file from disk):<br>
 =A0 $ wc -l big.str.txt<br>
 =A0 =A0 =A0100000 big.str.txt<br>
 =A0 $ ls -lh big.str.txt<br>
 =A0 =A0 =A0 -rw-r--r-- =A01 alex =A0staff =A0 572M 14 Nov 12:30 big.str.tx=
t<br>
 =A0 $ time grep &quot;([^:]+): warning[ \t]*[0-9]+[ \t]*:&quot; big.str.tx=
t<br>
 =A0 =A0 =A0 real =A0 =A0 0m0.525s<br>
 =A0 =A0 =A0 user =A0 =A0 0m0.255s<br>
 =A0 =A0 =A0 sys =A0 =A0 =A00m0.269s<br>
<br>
I see three ways to fix this problem:<br>
 =A0A) use a trusted 3rd party regex library, like re2 or pcre<br>
 =A0B) find another self-contained regex implementation<br>
 =A0C) try to use the standard POSIX regex available in regex.h on most sys=
tems<br>
<br>
I tried to find another self-contained regex implementation, that we could =
use. I found Tiny REX, but it is as slow, in this case, as Henry Spencer&#3=
9;s implementation.<br>
<br>
So what do you think is the best way to proceed about this problem?<br>
<br>
sincerely,<br>
Alex Ciobanu<br>
<br>
<br>
<br>
<br>--<br>
<br>
Powered by <a href=3D"http://www.kitware.com" target=3D"_blank">www.kitware=
.com</a><br>
<br>
Visit other Kitware open-source projects at <a href=3D"http://www.kitware.c=
om/opensource/opensource.html" target=3D"_blank">http://www.kitware.com/ope=
nsource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href=3D"http:/=
/www.cmake.org/Wiki/CMake_FAQ" target=3D"_blank">http://www.cmake.org/Wiki/=
CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href=3D"http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-develop=
ers" target=3D"_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/c=
make-developers</a><br></blockquote></div><br><br clear=3D"all"><br>-- <br>=
Pau Garcia i Quiles<br>

<a href=3D"http://www.elpauer.org">http://www.elpauer.org</a><br>(Due to my=
 workload, I may need 10 days to answer)<br>

--bcaec51dd1791c8ff904b1b5d6d0--


More information about the cmake-developers mailing list