41 |
Intel x86 32-bit and 64-bit |
Intel x86 32-bit and 64-bit |
42 |
MIPS 32-bit |
MIPS 32-bit |
43 |
Power PC 32-bit and 64-bit |
Power PC 32-bit and 64-bit |
44 |
SPARC 32-bit (experimental) |
SPARC 32-bit (experimental) |
45 |
.sp |
.sp |
46 |
If --enable-jit is set on an unsupported platform, compilation fails. |
If --enable-jit is set on an unsupported platform, compilation fails. |
47 |
.P |
.P |
49 |
available by calling \fBpcre_config()\fP with the PCRE_CONFIG_JIT option. The |
available by calling \fBpcre_config()\fP with the PCRE_CONFIG_JIT option. The |
50 |
result is 1 when JIT is available, and 0 otherwise. However, a simple program |
result is 1 when JIT is available, and 0 otherwise. However, a simple program |
51 |
does not need to check this in order to use JIT. The normal API is implemented |
does not need to check this in order to use JIT. The normal API is implemented |
52 |
in a way that falls back to the interpretive code if JIT is not available. For |
in a way that falls back to the interpretive code if JIT is not available. For |
53 |
programs that need the best possible performance, there is also a "fast path" |
programs that need the best possible performance, there is also a "fast path" |
54 |
API that is JIT-specific. |
API that is JIT-specific. |
55 |
.P |
.P |
56 |
If your program may sometimes be linked with versions of PCRE that are older |
If your program may sometimes be linked with versions of PCRE that are older |
387 |
.SH "JIT FAST PATH API" |
.SH "JIT FAST PATH API" |
388 |
.rs |
.rs |
389 |
.sp |
.sp |
390 |
Because the API described above falls back to interpreted execution when JIT is |
Because the API described above falls back to interpreted execution when JIT is |
391 |
not available, it is convenient for programs that are written for general use |
not available, it is convenient for programs that are written for general use |
392 |
in many environments. However, calling JIT via \fBpcre_exec()\fP does have a |
in many environments. However, calling JIT via \fBpcre_exec()\fP does have a |
393 |
performance impact. Programs that are written for use where JIT is known to be |
performance impact. Programs that are written for use where JIT is known to be |
394 |
available, and which need the best possible performance, can instead use a |
available, and which need the best possible performance, can instead use a |
395 |
"fast path" API to call JIT execution directly instead of calling |
"fast path" API to call JIT execution directly instead of calling |
396 |
\fBpcre_exec()\fP (obviously only for patterns that have been successfully |
\fBpcre_exec()\fP (obviously only for patterns that have been successfully |
397 |
studied by JIT). |
studied by JIT). |
398 |
.P |
.P |
399 |
The fast path function is called \fBpcre_jit_exec()\fP, and it takes exactly |
The fast path function is called \fBpcre_jit_exec()\fP, and it takes exactly |
400 |
the same arguments as \fBpcre_exec()\fP, plus one additional argument that |
the same arguments as \fBpcre_exec()\fP, plus one additional argument that |
401 |
must point to a JIT stack. The JIT stack arrangements described above do not |
must point to a JIT stack. The JIT stack arrangements described above do not |
402 |
apply. The return values are the same as for \fBpcre_exec()\fP. |
apply. The return values are the same as for \fBpcre_exec()\fP. |
403 |
.P |
.P |
408 |
for validity. In the interests of speed, these checks do not happen on the JIT |
for validity. In the interests of speed, these checks do not happen on the JIT |
409 |
fast path, and if invalid data is passed, the result is undefined. |
fast path, and if invalid data is passed, the result is undefined. |
410 |
.P |
.P |
411 |
Bypassing the sanity checks and the \fBpcre_exec()\fP wrapping can give |
Bypassing the sanity checks and the \fBpcre_exec()\fP wrapping can give |
412 |
speedups of more than 10%. |
speedups of more than 10%. |
413 |
. |
. |
414 |
. |
. |