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

Ben Hirsh <ben@mathtools.com>
19 Jun 1999 17:52:52 -0400

          From comp.compilers

Related articles
Just-In-Time C/C++ Compilation cerignac@graphics.cis.upenn.edu (Charles A Erignac) (1999-06-12)
Re: Just-In-Time C/C++ Compilation Renaud.Marlet@irisa.fr (Renaud Marlet) (1999-06-14)
Re: Just-In-Time C/C++ Compilation ben@mathtools.com (Ben Hirsh) (1999-06-19)
| List of all articles for this month |

From: Ben Hirsh <ben@mathtools.com>
Newsgroups: comp.compilers
Date: 19 Jun 1999 17:52:52 -0400
Organization: Deja.com - 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
all.


Ben
=====


> 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.