By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,910 Members | 1,141 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,910 IT Pros & Developers. It's quick & easy.

C++ interpreter

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.