Skip to content

Add an easy work to work out if you are on an optimizing runtime #47

@chrisseaton

Description

@chrisseaton

We want to avoid people running JRuby+Truffle on a standard JVM, or even a JVM with Graal but the wrong flags, and being disappointed about performance. When JRuby+Truffle starts we check that the TruffleRuntime is a Graal runtime, and if it isn't we present a warning. Doing this requires looking at the undocumented runtime name.

Truffle.getRuntime().getName().toLowerCase(Locale.ENGLISH).contains("graal");

I wonder if it would be useful to add a method boolean isOptimizing() to TruffleRuntime. This hides the implementation detail that it is Graal being used, and leaves the door open for any other hypothetical optimising Truffle runtimes, while still allowing us to show our warning.

Another option would be the inverse - boolean isInterpreter().

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions