dcdelia  over 8 years ago

Commit id: b5ee78073ad0d86ded43ea6759a45df390f81e8a

deletions | additions      

       

\end{verbatim}  \end{small}  \noindent In this scenario McVM can compile the whole program ahead of time, as {\tt rhsSteelHeat} is not invoked through an {\tt feval} call anymore. A comparison of the running times suggests a rough $32.537/11.777=2.791$ speedup for by-hand optimization w.r.t. the baseline version. We can now try to assess the speedup for our {\tt feval} optimization technique on {\tt odeRK4}:  \begin{small}  \begin{verbatim}  $ cd ~/Desktop/mcvm  $ ./mcvm -jit_feval_opt true <  benchmarks/scripts/base/odeRK4  ***********************************************  McVM - The McLab Virtual Machine v1.0  Visit http://www.sable.mcgill.ca for more info.  ***********************************************  >: >: Compiling function: "testSH"  Compiling function: "odeRK4"  Compiling and tracking a feval instruction...  Compiling and tracking a feval instruction...  Compiling and tracking a feval instruction...  Compiling and tracking a feval instruction...  Function contains annotated feval instructions!  Compiling function: "testSHfun"  Compiling function: "rhsSteelHeat"  Type conversion required for variable y  Type conversion required for variable $t10  [TOC] Elapsed time: 12.214164 seconds  t y_RK4  0.0000 1.000000  20.0000 227.364633  \end{verbatim}  \end{small}  \noindent The execution time ratio between the base version and the optimized code that we JIT-compile is thus $32.867/12.214=2.691$. We can observe that compensation code is generated to perform unboxing of IIR variables {\tt y} and {\tt \$t10} so that execution can correctly resume from the optimized code.