Skip to content

Commit 99304a9

Browse files
committed
optimize: use more appressive JIT compiler parameters as the default to help large OpenResty Lua apps.
We now use the following jit.opt defaults: maxtrace=8000 maxrecord=16000 minstitch=3 maxmcode=40960 -- in KB
1 parent 2849a10 commit 99304a9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lj_jit.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@
9797

9898
/* Optimization parameters and their defaults. Length is a char in octal! */
9999
#define JIT_PARAMDEF(_) \
100-
_(\010, maxtrace, 1000) /* Max. # of traces in cache. */ \
101-
_(\011, maxrecord, 4000) /* Max. # of recorded IR instructions. */ \
100+
_(\010, maxtrace, 8000) /* Max. # of traces in cache. */ \
101+
_(\011, maxrecord, 16000) /* Max. # of recorded IR instructions. */ \
102102
_(\012, maxirconst, 500) /* Max. # of IR constants of a trace. */ \
103103
_(\007, maxside, 100) /* Max. # of side traces of a root trace. */ \
104104
_(\007, maxsnap, 500) /* Max. # of snapshots for a trace. */ \
105-
_(\011, minstitch, 1000000) /* Min. # of IR ins for a stitched trace. */ \
105+
_(\011, minstitch, 3) /* Min. # of IR ins for a stitched trace. */ \
106106
\
107107
_(\007, hotloop, 56) /* # of iter. to detect a hot loop/call. */ \
108108
_(\007, hotexit, 10) /* # of taken exits to start a side trace. */ \
@@ -116,7 +116,7 @@
116116
/* Size of each machine code area (in KBytes). */ \
117117
_(\011, sizemcode, JIT_P_sizemcode_DEFAULT) \
118118
/* Max. total size of all machine code areas (in KBytes). */ \
119-
_(\010, maxmcode, 512) \
119+
_(\010, maxmcode, 40960) \
120120
/* End of list. */
121121

122122
enum {

0 commit comments

Comments
 (0)