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
This commit is contained in:
Takashi Kokubun 2022-11-25 15:49:52 -08:00
Родитель 3c16f33ffd
Коммит ac4d00df82
2 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -445,6 +445,7 @@ The following deprecated APIs are removed.
* As a result, Microsoft Visual Studio (MSWIN) is no longer supported. * As a result, Microsoft Visual Studio (MSWIN) is no longer supported.
* MinGW is no longer supported. [[Feature #18824]] * MinGW is no longer supported. [[Feature #18824]]
* Rename `--mjit-min-calls` to `--mjit-call-threshold`. * Rename `--mjit-min-calls` to `--mjit-call-threshold`.
* Change default `--mjit-max-cache` back from 10000 to 100.
## Static analysis ## Static analysis

2
mjit.c
Просмотреть файл

@ -1626,7 +1626,7 @@ system_tmpdir(void)
// Minimum value for JIT cache size. // Minimum value for JIT cache size.
#define MIN_CACHE_SIZE 10 #define MIN_CACHE_SIZE 10
// Default permitted number of units with a JIT code kept in memory. // 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. // A default threshold used to add iseq to JIT.
#define DEFAULT_CALL_THRESHOLD 10000 #define DEFAULT_CALL_THRESHOLD 10000