What model is selected to execute a Java program?

xiaoxiao2021-03-06  49

When performing a Java program, you can choose the mode you want to use. You can choose to interpretation mode, execute directly, or Just-In-Time (JIT) compilation.

Interpretation mode:

If you select a Java program in interprelation mode, the procedure code will be verified, and a Java program is generated to retain this pre-verified program. Each bit element code is interpreted when executed.

For information on performing Java programs in interpretation mode, see Executing Java (RunJVA) instructions.

Direct execution:

If you select a Java program directly, the process code will be verified, and a Java program is generated to retain this pre-verified program. The machine instruction of the method is generated when the first call method is used, and it is stored for the next execution program. Moreover, the entire system also shares a copy.

For information on direct Java programs, see Executing the Java (RunJVA) instruction.

Just-in-Time (JIT) compile:

When you perform the Java program, choose to use the Just-IN-TIME compiler, the process code is verified, and a related Java program is generated to retain this pre-verified program. The machine instruction of the method is generated when the first call method is used, and it is stored for use when the Java virtual machine is executed.

To use the JIT compiler, you must set the compiler value to JITC. You can add an environment variable or set the nature of Java.comPiler system. Please select a method from the following list to set the compiler value:

Enter the "Addenvvar" instruction on the AS / 400 instruction line to add environment variables. Then, use the "Perform Java (RunJVA" instruction or Java instruction to perform the Java program. For example, enter Addenvar Envvar (Java_Compiler) Value (JITC)

Java Class (TEST)

Set the Java.comPiler system nature on the AS / 400 command line. For example, enter Java Class (Java.comPiler Jitc) Set the Java.comPiler system nature on the QShell Interpreter command line. For example, when you enter java -djava.compiler = JITC Test Once this value is set, the JIT compiler will first optimize before executing the Java program.

Just-in-Time (JIT) Compile and Direct Execution:

The most common method using the Just-In-Time (JIT) compiler is through the JIT_DE option. When using this option to execute, the optimized program has been performed directly, which will be executed in direct execution mode. Over-optimized programs have not been optimized, in JIT mode.

To use JIT and direct execution at the same time, you must set the compiler value to jitc-de. You can add an environment variable or set the nature of Java.comPiler system. Please select a method from the following list to set the compiler value:

Enter the "Addenvvar" instruction on the AS / 400 instruction line to add environment variables. Then, use the "Perform Java (RunJVA" instruction or Java instruction to perform the Java program. For example, enter Addenvar Envvar (Java_Compiler) Value (Jitc_DE)

Java Class (TEST)

Set the Java.comPiler system nature on the AS / 400 command line. For example, enter Java Class (Java.comPiler Jitc_DE) Set the Java.comPiler system properties on the QShell directive line. For example, enter java -djava.compiler = JITC_DE TEST once setting this value, will use the Java program that has been created to be executed directly. If the Java program is not established to execute directly, the JIT will optimize the class file before the execution program. For details, see Comparing Just-In-Time compilers and direct execution.

Compare Just-In-Time (JIT) compiler and direct execution

If you are deciding whether to use a Just-In-Time (JIT) compiler or direct execution mode to perform Java program, this form has its own information to assist you with the best choice.

The Just-IN-TIME (JIT) compiler provides automatic compilation of any method directly when needed. This method is faster than direct execution. Use the "Creating the Java Code (CRTJVAPGM) instruction to compile the entire category or JAR file, or automatically compile the file during execution time. Used to develop small or unoccupied applications, as well as high-dynamic applications that are developed during execution or loading process. JIT may be the only choice of the optimized program code except for the solution to declaration (which is usually much slower). Used in large applications. The direct execution code of the optimization level 40 is usually faster than JIT. Most of the ready-to-store server applications are executed directly in the optimization level 40, as it is likely to have multiple users in using these applications, and the cost of repeating JIT is too large. The application that can be performed quickly can be optimized only if the execution time can perform. There may be other more complex optimization because the execution time does not perform optimization.

转载请注明原文地址:https://www.9cbs.com/read-82807.html

New Post(0)