Activating dynamic rule compilation

Another way to improve RetePlus performance is to rely on Just-In-Time compilation of the rule condition part to bytecode.

The Java™ development environment has two parts: a Java compiler and a Java interpreter.

Important:

To take benefit of the JIT feature, you must meet the following prerequisites:

Java compiler

The Java compiler generates bytecode from your source files instead of generating machine code. The Java Virtual Machine (JVM) runs this bytecode. Each item of bytecode has a precise specification that defines exactly what it does to the virtual machine.

Java interpreter

The Java interpreter examines each item in the bytecode stream of a method and, in turn, executes a unique action.

To translate a ruleset (an .irl file) in this manner, and subsequently speed up execution, you can use a dynamic translation or Just-In-Time (JIT) compilation for the RetePlus rule tasks. The JIT technology translates the condition part of each rule to Java bytecode. The bytecode is then used to evaluate the condition tests. JIT identifies the process of translating the ILOG® Rule Language (IRL) condition parts to Java bytecode. This dynamic bytecode generation is completely transparent to the application and can even be applied to rules that refer to dynamic classes.

To use the JIT feature, set the value of the ilog.rules.engine.useJIT property to true in one of the following two ways:

When the useJIT property is set to true, the rule engine uses dynamic rule compilation in its internal algorithm to evaluate rules. In terms of performance, the JIT feature makes interpreted rules execute at a similar speed as compiled rules.