octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question


From: John W. Eaton
Subject: Re: Question
Date: Thu, 7 Jul 2016 22:06:49 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0

On 07/07/2016 08:07 PM, Jordi Gutiérrez Hermoso wrote:
On Thu, 2016-07-07 at 11:27 +0300, Dominic O'Kane wrote:

I was wondering if it might be easier to have a built in parser that
can convert octave code to C

No, it's not easier. It's more or less exactly the same problem as a
JIT compiler. The only big difference between ahead-of-time compiling
or just-in-time compiling is when the compiling happens, but both have
to solve the same problem of type inference and so forth.

And you can actually have more information available with JIT compiling because you can use the types of the actual arguments that are passed to a function and compile a version of the function for those types and reuse it if you encounter the same types and number of arguments in a future call. You can't have that information if you are attempting a general Octave to C++ translator that generates code to compile just once for the entire program in advance of running it.

jwe




reply via email to

[Prev in Thread] Current Thread [Next in Thread]