diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2022-11-25 15:49:52 -0800 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2022-11-25 15:55:19 -0800 |
commit | ac4d00df824215d4b85d36cef75c76543fead33e (patch) | |
tree | 50cba368269cfb93b38e7f1b46939472198b4287 | |
parent | 3c16f33ffdfb96bfdd45bc6067175dcd2eb3f090 (diff) |
MJIT: Change default --mjit-max-cache back to 100
These days we benchmark MJIT using yjit-bench. The warmup duration in
yjit-bench is very short, so compiling many methods comes at a cost even
while it's actually optimal for MJIT to compile everything / tens of
thousands of methods once it reaches the peak performance.
yjit-bench doesn't necessarily represent the peak performance on production.
It measures the performance of Ruby 30~60s after boot. If your JIT takes
more than 1 minute to warm up, there's no way for the JIT to make the numbers
good on yjit-bench.
Until we make MJIT's compilation much faster, we don't afford compiling
10,000 methods on yjit-bench.
This change alone makes MJIT's benchmark number on railsbench 2x better :p
-rw-r--r-- | NEWS.md | 1 | ||||
-rw-r--r-- | mjit.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -445,6 +445,7 @@ The following deprecated APIs are removed. * As a result, Microsoft Visual Studio (MSWIN) is no longer supported. * MinGW is no longer supported. [[Feature #18824]] * Rename `--mjit-min-calls` to `--mjit-call-threshold`. +* Change default `--mjit-max-cache` back from 10000 to 100. ## Static analysis @@ -1626,7 +1626,7 @@ system_tmpdir(void) // Minimum value for JIT cache size. #define MIN_CACHE_SIZE 10 // Default permitted number of units with a JIT code kept in memory. -#define DEFAULT_MAX_CACHE_SIZE 10000 +#define DEFAULT_MAX_CACHE_SIZE 100 // A default threshold used to add iseq to JIT. #define DEFAULT_CALL_THRESHOLD 10000 |