468,467 Members | 2,679 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,467 developers. It's quick & easy.

C++ interpreter

Hi,

Once C++ program use a lot of metaprogramming, the compilation of the
code takes a lot of time. I'm wondering if there is any C++ interpreter
available such that I don't have to wait for too long to run the binary
code.

Thanks,
Peng

Jul 12 '06 #1
3 3281
PengYu.UT wrote:
Once C++ program use a lot of metaprogramming, the compilation of the code
takes a lot of time. I'm wondering if there is any C++ interpreter
available such that I don't have to wait for too long to run the binary
code.
I would guess that any interpreters cannot evaluate templates as
correctly as a real compiler. And metaprogramming is supposed to be about
speed of execution, so you would lose that, too.

Have you followed sane coding practices, so each recompile is as short as
possible?

--
Phlip
Jul 12 '06 #2
On Wed, 12 Jul 2006 18:21:10 GMT, Phlip <ph*******@gEEEmail.com>
wrote:
>PengYu.UT wrote:
>Once C++ program use a lot of metaprogramming, the compilation of the code
takes a lot of time. I'm wondering if there is any C++ interpreter
available such that I don't have to wait for too long to run the binary
code.

I would guess that any interpreters cannot evaluate templates as
correctly as a real compiler. And metaprogramming is supposed to be about
speed of execution, so you would lose that, too.
Templates constitute a Turing complete sublanguage (macro-language)
within C++. In that sense, the template evaluation machanism is the
interpreter.

Best wishes,
Roland Pibinger
Jul 12 '06 #3
Once C++ program use a lot of metaprogramming, the compilation of the
code takes a lot of time. I'm wondering if there is any C++ interpreter
available such that I don't have to wait for too long to run the binary
code.
You may try
http://www.softintegration.com/
whether it will work with your code.

Also CINT interpreter exists
http://root.cern.ch/root/CintInterpreter.html
but it is not very string in dealing with metaprograms.

My feeling is that no interpreter will be significantly
faster than a compiler, just because most of the
work is spent in front-end and all this needs to
be made during interpretation.

/Pavel
Jul 12 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Neil Benn | last post: by
12 posts views Thread by Anon | last post: by
12 posts views Thread by Rex Eastbourne | last post: by
4 posts views Thread by Ian Giblin | last post: by
12 posts views Thread by ozbear | last post: by
6 posts views Thread by gr | last post: by
3 posts views Thread by Robin Becker | last post: by
40 posts views Thread by castironpi | last post: by
5 posts views Thread by Erik Hahn | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.