Re: Just-In-Time C/C++ Compilation

Ben Hirsh <>
19 Jun 1999 17:52:52 -0400

          From comp.compilers

Related articles
Just-In-Time C/C++ Compilation (Charles A Erignac) (1999-06-12)
Re: Just-In-Time C/C++ Compilation (Renaud Marlet) (1999-06-14)
Re: Just-In-Time C/C++ Compilation (Ben Hirsh) (1999-06-19)
| List of all articles for this month |

From: Ben Hirsh <>
Newsgroups: comp.compilers
Date: 19 Jun 1999 17:52:52 -0400
Organization: - Share what you know. Learn what you don't.
Keywords: practice

Our MIDEVA, which is interpreter for m-files, works exactly this
way. Running on Windows, every line the user types is compiled into a
DLL; the DLL is then immediatly called and deleted afterwards.

How fast is it ? not too fast. On a fast pentium II machine, using
Visual C++, it takes about 2sec from prompt to prompt.

I have analyzed the time overheads involved, and (very roughly),
compiler invocation is 0.5s, compilation is 0.5, linking is 0.5s and
the rest is overhead. Modern compilers are large beasts, so loading
takes some time. Once loaded, it can compile additional files very
fast, so it's one time cost.

The problem is, in such application, one-time costs are all that
matter, and compilers+linkers are not optimized for this purpose at


> Here is my idea: - The simulator runs as an interpretor but uses a C
> or C++ compiler to convert its arithmetic operations (linear system
> solving, and integration) and support logic into a dynamic
> library. - The compilation is a background process. - The simulator
> runs as an interpreter until the compilation is completed. At that
> point, the dynamic library is loaded and replaces the interpretation
> phase.

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.