Date: Fri, 29 Mar 2002 21:21:03 +0500 (YEKT) From: Ilia Chipitsine <ilia@cgu.chel.su> To: questions@FreeBSD.ORG Cc: hackers@FreeBSD.ORG Subject: perfomance and regular expressions Message-ID: <Pine.BSF.4.10.10203292117510.1096-100000@jane.poka.net>
next in thread | raw e-mail | index | archive | help
Dear Sirs,
I'm currently implementing a program which will run thousands and
thousands times. It uses regular expressions.
something really simple, like
regex_t re;
regcomp(&re,"^[0123456789abcdefghijklmnopqrstuvwxyz]{1,8}$",
REG_EXTENDED+REG_ICASE);
return(!regexec(&re,name,0,0,0));
so, questions are:
1) is it faster to "compile" regex once and load it from file every time
program starts ?
2) how to store in a file data of type "regex_t" ??
Regards, (Наилучшие пожелания)
Ilia Chipitsine (Илья Шипицин)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.10203292117510.1096-100000>
