@@ -47,28 +47,31 @@ is that you can't use Java tools like VisualVM, you can't use Java
47
47
interoperability, and * peak performance may be lower than on the JVM* . The
48
48
native configuration is used by default, but you can also request it using
49
49
` --native ` . To use polyglot programming with the * native* configuration, you
50
- need to use the ` --polyglot ` flag.
50
+ need to use the ` --polyglot ` flag. To check you are using the * native*
51
+ configuration, ` ruby --version ` should mention ` Native ` .
51
52
52
53
TruffleRuby can also be used in the * JVM* configuration, where it runs as a
53
54
normal Java application on the JVM, as any other Java application would. The
54
55
advantage of the JVM configuration is that you can use Java interoperability,
55
56
and * peak performance may be higher than the native configuration* . The
56
57
disadvantage of the JVM configuration is that it takes much longer to start and
57
58
to get fast, and may use more memory. The JVM configuration is requested using
58
- ` --jvm ` .
59
+ ` --jvm ` . To check you are using the * JVM* configuration, ` ruby --version ` should
60
+ not mention ` Native ` .
59
61
60
62
If you are running a short-running program you probably want the default,
61
63
* native* , configuration. If you are running a long-running program and want the
62
64
highest possible performance you probably want the * JVM* configuration, by using
63
65
` --jvm ` .
64
66
65
67
At runtime you can tell if you are using the native configuration using
66
- ` TruffleRuby.native? ` .
68
+ ` TruffleRuby.native? `
67
69
68
70
You won't encounter it when using TruffleRuby from the GraalVM, but there is
69
71
also another configuration which is TruffleRuby running on the JVM but with the
70
72
Graal compiler not available. This configuration will have much lower
71
- performance and should normally only be used for development.
73
+ performance and should normally only be used for development. ` ruby --version `
74
+ will mention ` Interpreter ` for this configuration.
72
75
73
76
## System Compatibility
74
77
0 commit comments