Re: Indepth Analyses Of Euphoria Translator

new topic     » goto parent     » topic index » view thread      » older message » newer message

MTS wrote:

> For one, code size is still way too big...

Well, the code is obviously always going to be larger than interpreted code,
and considerably larger than 'equivalent' C code. That's primarily because
of the overhead of the garbage collection, which has to be made explicit.
You can't just add two objects:

   a = b + c

You have to dereference the prior values, hold and release temporary
expressions, and so on. Instead of nice, space efficient bytecodes, you're
at the mercy of whatever compiler you happen to be using.

Additionally, there's usually a tradeoff of speed versus size. For example,
instead of calling small, common routines (and incurring the associated
overhead), the compiled version inlines a lot of code with macros, making
the source code even larger.

> For two, execution speeds are still not
> as fast as they should be...

Relative to what? The interpreter? I'm not suprised that the interpreter
remains faster in many cases. For one thing, you have better control over
the optimization of the bytecodes, and deciding what needs to be inlined.
Garbage collection can be made implicit within the instructions, instead of
having to spell them out with seperate instructions.

If you were talking about low-level stuff (like adding integers), C code
might run faster. But when you start working with high-level constructs with
complex datatypes, bytecodes start coming into their own.

> For two, the code is still unreadable,
> mainly because it's so big...

And optimized. Integer code, for example, creates 'empty' blocks because the
compiler knows that it will never be reached.

> If the code size was reduced, you could
> hand-edit stuff much easier,

Or you could just use dummy routines at the high level, and then write a
routine that would seek out these dummy routines, and replace them with
appropriate calls.

> and it would pass as hand-written
> code as well...

Given that the code is worthless on it's own, I can't imagine why you would
want that.

> For three, the runtime library is still
> in compiled form...

I don't think that Robert is going to give away 'the keys to the kingdom',
so to speak.

-- David Cuny

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu