1 |
root |
1.1 |
NAME |
2 |
root |
1.2 |
Faster - do some things faster |
3 |
root |
1.1 |
|
4 |
|
|
SYNOPSIS |
5 |
root |
1.2 |
use Faster; |
6 |
|
|
|
7 |
|
|
perl -MFaster ... |
8 |
root |
1.1 |
|
9 |
|
|
DESCRIPTION |
10 |
root |
1.2 |
This module implements a very simple-minded JIT. It works by more or |
11 |
|
|
less translating every function it sees into a C program, compiling it |
12 |
|
|
and then replacing the function by the compiled code. |
13 |
|
|
|
14 |
|
|
As a result, startup times are immense, as every function might lead to |
15 |
|
|
a full-blown compilation. |
16 |
|
|
|
17 |
|
|
The speed improvements are also not great, you can expect 20% or so on |
18 |
|
|
average, for code that runs very often. |
19 |
|
|
|
20 |
|
|
Faster is in the early stages of development. Due to its design its |
21 |
|
|
relatively safe to use (it will either work or simply slowdown the |
22 |
|
|
program immensely, but rarely cause bugs). |
23 |
|
|
|
24 |
|
|
Usage is very easy, just "use Faster" and every function called from |
25 |
|
|
then on will be compiled. |
26 |
|
|
|
27 |
|
|
Right now, Faster will leave ltos of *.c, *.o and *.so files in /tmp, |
28 |
|
|
and it will even create those temporary files in an insecure manner, so |
29 |
|
|
watch out. |
30 |
|
|
|
31 |
|
|
BUGS/LIMITATIONS |
32 |
|
|
Perl will check much less often for asynchronous signals in |
33 |
|
|
Faster-compiled code. It tries to check on every function call, loop |
34 |
|
|
iteration and every I/O operator, though. |
35 |
|
|
|
36 |
|
|
The following things will disable Faster. If you manage to enable them |
37 |
|
|
at runtime, bad things will happen. |
38 |
|
|
|
39 |
|
|
enabled tainting |
40 |
|
|
enabled debugging |
41 |
|
|
|
42 |
|
|
This will dramatically reduce Faster's performance: |
43 |
|
|
|
44 |
|
|
threads (but you don't care about speed if you use threads anyway) |
45 |
|
|
|
46 |
|
|
These constructs will force the use of the interpreter as soon as they |
47 |
|
|
are being executed, for the rest of the currently executed: |
48 |
|
|
|
49 |
|
|
.., ... (flipflop operators) |
50 |
|
|
goto |
51 |
|
|
next, redo (but not well-behaved last's) |
52 |
|
|
eval |
53 |
|
|
require |
54 |
|
|
any use of formats |
55 |
root |
1.1 |
|
56 |
|
|
AUTHOR |
57 |
|
|
Marc Lehmann <schmorp@schmorp.de> |
58 |
|
|
http://home.schmorp.de/ |
59 |
|
|
|