Skip to content

Commit

Permalink
[GR-52676] Enable the Panama NFI backend by default
Browse files Browse the repository at this point in the history
  • Loading branch information
eregon committed Nov 10, 2024
1 parent 27ff68f commit 28d3457
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Compatibility:

Performance:

* Speedup some C extensions like `sqlite3`, `trilogy` and `json` by 2 to 3 times by using the Panama NFI backend for faster upcalls in JVM mode (@eregon).
* Optimize encoding negotiation for ASCII-compatible encodings (@eregon, @andrykonchin).

Changes:
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/truffleruby/options/Options.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public final class Options {
public final boolean CEXTS;
/** --cexts-lock=true */
public final boolean CEXT_LOCK;
/** --cexts-panama=false */
/** --cexts-panama=true */
public final boolean CEXTS_PANAMA;
/** --options-log=false */
public final boolean OPTIONS_LOG;
Expand Down
2 changes: 1 addition & 1 deletion src/options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ EXPERT:
# C extension options
CEXTS: [cexts, boolean, true, Enable use of C extensions]
CEXT_LOCK: [cexts-lock, boolean, true, Use a Global Lock when running C extensions]
CEXTS_PANAMA: [cexts-panama, boolean, false, 'Use Panama for native to Ruby calls in C extensions. Only available in --jvm mode on JDK 22+.']
CEXTS_PANAMA: [cexts-panama, boolean, true, 'Use Panama for native to Ruby calls in C extensions. Only available in --jvm mode on JDK 22+.']

# Debugging the values of options
OPTIONS_LOG: [options-log, boolean, false, Log the final value of all options]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public final class OptionsCatalog {
public static final OptionKey<Boolean> BACKTRACE_ON_NEW_FIBER_KEY = new OptionKey<>(false);
public static final OptionKey<Boolean> CEXTS_KEY = new OptionKey<>(true);
public static final OptionKey<Boolean> CEXT_LOCK_KEY = new OptionKey<>(true);
public static final OptionKey<Boolean> CEXTS_PANAMA_KEY = new OptionKey<>(false);
public static final OptionKey<Boolean> CEXTS_PANAMA_KEY = new OptionKey<>(true);
public static final OptionKey<Boolean> OPTIONS_LOG_KEY = new OptionKey<>(false);
public static final OptionKey<Boolean> LOG_LOAD_KEY = new OptionKey<>(false);
public static final OptionKey<Boolean> LOG_AUTOLOAD_KEY = new OptionKey<>(false);
Expand Down

0 comments on commit 28d3457

Please sign in to comment.