summaryrefslogtreecommitdiff
path: root/yjit_iface.c
diff options
context:
space:
mode:
authorMaxime Chevalier-Boisvert <maximechevalierb@gmail.com>2021-05-26 15:25:50 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:35 -0400
commitb415ceb92e464011a9326c9cb5e15a84c39da330 (patch)
tree5b42a1b39408a81d60215929b4f6e138e3ab57b8 /yjit_iface.c
parent764740c6615292dc994707b964c135871149fb2b (diff)
Increase default YJIT call threshold to 10. Add exec mem size arg. (#52)
Diffstat (limited to 'yjit_iface.c')
-rw-r--r--yjit_iface.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/yjit_iface.c b/yjit_iface.c
index 60b25cd8e9..01075ea1ee 100644
--- a/yjit_iface.c
+++ b/yjit_iface.c
@@ -1048,9 +1048,12 @@ rb_yjit_init(struct rb_yjit_options *options)
rb_yjit_opts = *options;
rb_yjit_opts.yjit_enabled = true;
- // Normalize command-line options
+ // Normalize command-line options to default values
+ if (rb_yjit_opts.exec_mem_size < 1) {
+ rb_yjit_opts.exec_mem_size = 256;
+ }
if (rb_yjit_opts.call_threshold < 1) {
- rb_yjit_opts.call_threshold = 2;
+ rb_yjit_opts.call_threshold = 10;
}
if (rb_yjit_opts.version_limit < 1) {
rb_yjit_opts.version_limit = 4;