[Ecls-list] ECL + ContextL?

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Tue Nov 3 11:39:06 UTC 2009


On Tue, Nov 3, 2009 at 11:13 AM, Alexander Gavrilov
<angavrilov at gmail.com> wrote:
> On Tue, Nov 3, 2009 at 1:35 AM, Juan Jose Garcia-Ripoll
> <juanjose.garciaripoll at googlemail.com> wrote:
>> ECL and GCL and any other C based compiler are going to have this
>> problem always... Unless, of course, the C compiler itself can be
>> embedded in the environment itself.
>
> I'm not complaining, I just think that it is a valid technical reason
> to re-evaluate the tradeoff between bytecode and compilation for
> dynamic code. I wonder how big is the actual speed difference
> for the kind of simple functions that are used in contextl.

Oh, please understand I was not taking your email as a complain. I was
more or less explaining the reasons for the cost.

One important thing, though: there are many compilation strategies,
though ECL currently only implements two:
- COMPILE may compile individually each lambda form using the C compiler
- COMPILE may exclusively bytecompile using (require 'bytecmp). This
is very very cheap in compilation effort, but may produce slower code

Other approach that has not been implemented would be to have some
sort of delayed compilation: collect all lambda forms that are passed
to COMPILE, storing them as closures that, when invoked, dumps all
forms and compiles them all together. That would be slightly more
efficient, I would say.

>> However, I think we are on the right track: my local tree already has
>> a new version of the lisp-to-C translator that uses a different
>> internal representation. It is not ready for production, but it
>> features a simpler code flow graph that could be used both for better
>> type inference and also, hopefully, to produce LLVM's desired
>> representation.
>
> How is it going to affect ffi:c-inline? Currently ECL seems to be the
> only implementation where it is reasonably possible to use SSE
> instructions, by means of generating inline C code fragments
> with SSE intrinsics via compiler macros.

In no way, I would say. If your program still has C statements and
there is no way for LLVM to automatically parse that, then the file
will be compiled via the command line; otherwise if things work out as
expected, code without special syntax would be directly compiled via
the LLVM library.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com




More information about the ecl-devel mailing list