version 1.1.1.2, 2012/02/21 23:50:25
|
version 1.1.1.4, 2013/07/22 08:25:56
|
Line 1
|
Line 1
|
.TH PCREPERFORM 3 | .TH PCREPERFORM 3 "09 January 2012" "PCRE 8.30" |
.SH NAME |
.SH NAME |
PCRE - Perl-compatible regular expressions |
PCRE - Perl-compatible regular expressions |
.SH "PCRE PERFORMANCE" |
.SH "PCRE PERFORMANCE" |
Line 68 that PCRE cannot otherwise handle.
|
Line 68 that PCRE cannot otherwise handle.
|
.SH "STACK USAGE AT RUN TIME" |
.SH "STACK USAGE AT RUN TIME" |
.rs |
.rs |
.sp |
.sp |
When \fBpcre_exec()\fP or \fBpcre16_exec()\fP is used for matching, certain | When \fBpcre_exec()\fP or \fBpcre[16|32]_exec()\fP is used for matching, certain |
kinds of pattern can cause it to use large amounts of the process stack. In |
kinds of pattern can cause it to use large amounts of the process stack. In |
some environments the default process stack is quite small, and if it runs out |
some environments the default process stack is quite small, and if it runs out |
the result is often SIGSEGV. This issue is probably the most frequently raised |
the result is often SIGSEGV. This issue is probably the most frequently raised |
Line 91 about optimizing regular expressions for efficient per
|
Line 91 about optimizing regular expressions for efficient per
|
contains a few observations about PCRE. |
contains a few observations about PCRE. |
.P |
.P |
Using Unicode character properties (the \ep, \eP, and \eX escapes) is slow, |
Using Unicode character properties (the \ep, \eP, and \eX escapes) is slow, |
because PCRE has to scan a structure that contains data for over fifteen | because PCRE has to use a multi-stage table lookup whenever it needs a |
thousand characters whenever it needs a character's property. If you can find | character's property. If you can find an alternative pattern that does not use |
an alternative pattern that does not use character properties, it will probably | character properties, it will probably be faster. |
be faster. | |
.P |
.P |
By default, the escape sequences \eb, \ed, \es, and \ew, and the POSIX |
By default, the escape sequences \eb, \ed, \es, and \ew, and the POSIX |
character classes such as [:alpha:] do not use Unicode properties, partly for |
character classes such as [:alpha:] do not use Unicode properties, partly for |
Line 173 Cambridge CB2 3QH, England.
|
Line 172 Cambridge CB2 3QH, England.
|
.rs |
.rs |
.sp |
.sp |
.nf |
.nf |
Last updated: 09 January 2012 | Last updated: 25 August 2012 |
Copyright (c) 1997-2012 University of Cambridge. |
Copyright (c) 1997-2012 University of Cambridge. |
.fi |
.fi |