|
|
|
|
|
- Overview
- Implementing and using JITc
- The JITc technology is used by default
- Specific processes that disable the JITc technology
- Tips for optimizing the benefit of the JITc technology
- How to disable the JITc technology?
The principle behind JITc (Just In Time Compilation) technology is very simple: WINDEV's L5G code is transformed on the runtime machine into "native assembly code" as it is executed. The execution speed is faster on all WLanguage commands. The speed is up to 15 times faster for the assignment loops and up to 7 times faster for the calculations performed on integers and reals. Some important scientific processes can now be easily performed by WINDEV via this technology. For a standard management application, the gain of speed is about 8%. Implementing and using JITc The JITc technology is used by default This technology is directly applied to the executable. While the application is run, the code run is changed into assembler code and run. Only the necessary code is compiled (improving the performance of the application). An application using JITc technology consumes slightly more memory: the space required for the assembly code generated. Good to know: Some codes are not taken into account when using JITc technology: - The calls to dbgAssert. Indeed, this function is intended for the test mode only.
- When using conditional target-codes, only the code corresponding to the current platform is taken into account. The other codes are not compiled.
Specific processes that disable the JITc technology The JITc technology is not used when the application GO is performed from the editor. This technology is also automatically disabled: - When the profiler is enabled.
- When the runtime logs are enabled.
- When the application is debugged remotely.
The JITc technology will be automatically re-enabled during the next start of the application. Tips for optimizing the benefit of the JITc technology By default, the JITc technology is used to increase the speed of your WINDEV applications. Some simple rules are used to maximize the benefit of the JITc technology. All you have to do is slightly modify the source code: - Use local variables instead of global variables:
In some cases, it may be easier to declare global variables while a local variable is good enough. In this case, the global variable should be replaced with a local variable. For example, a global variable is passed as parameter to a procedure while this variable is not modified by this procedure. The global variable may be replaced with a local variable. - Type the local variables used in the WLanguage procedures:
In the declaration code of the procedures, the parameters expected by the procedure should be typed. The performance of the application will be optimized (especially for real or integer parameters). For example: Replace the following code:
PROCÉDURE MyCalculation(VarA, VarB, VarC)
by:
PROCÉDURE MyCalculation(VarA is real, VarB is real, VarC is real)
The JITc technology applies to the following types of code: - OOP: object programming, class, methods, members, ...
- Structures: declare structure variables.
In order for the JITc technology to be efficient, we advise you to specify the type of the variables or members as well as the type of the parameters passed to the methods of classes. How to disable the JITc technology? To disable the JITc technology in an application, you have the ability to use ExecutionMode. If you think there may be problems with the JITc technology, you can disable it: - on the current computer by modifying the WINI.INI file.
Modifying the WIN.INI file deactivates JITc on the current workstation: all WINDEV applications installed on this workstation (including WINDEV itself) will no longer use this technology.. To do so, add the following lines of code:
[WD_EXECUTION] OPTIM_EXECUTION=0 - for a specific application, by modifying (or adding) the <Executable name>.WX file.
This file is found beside the executable. To disable the JITc technology, add the following lines:
[WD_EXECUTION] OPTIM_EXECUTION=0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|