Re: Lisp object code versus that of other languages
- From: Duane Rettig <duane@xxxxxxxxx>
- Date: Wed, 31 Aug 2005 01:40:34 -0700
tfb@xxxxxxxxxxxxxxxxxxxxxxxxx (Thomas F. Bur***) writes:
> "jonathon" <j_mckitrick@xxxxxxxxxxx> writes:
>
>> I've recently gone from Lisp (back) to assembly language to do some
>> 'fun' stuff I haven't done in a long time. I've been looking at a few
>> samples of Lisp object code (disassemble in sbcl) and found some pretty
>> cryptic code.
>>
>> Is it true to say that Lisp produces more complex and/or cryptic code
>> than, say, C/C++ and other languages that can compile direct to ML?
>
> No. The Python compiler on x86 certainly does produce some cryptic
> code, particularly when it's not optimizing for speed. The Allegro
> compiler on SPARC produces quite readable code. Python on RISC
> architectures is somewhere in between, as I assume would be Allegro's
> compiler on x86.
In general, our disassemblers produce instruction formats in a format
closely compatible with the hardware manufaturer's recommended formats.
So much so that I sometimes post disassembled code to comp.arch and
the engineers there have no trouble understanding it.
As for what the compiler produces - I've spoken many years ago
about the insufficiency of standard "C calling conventions" for
efficient compiled CL code. That said, however, to the extent
practical we do follow most of those protocols, even when Lisp
is calling Lisp, and we only enhance what is necessary for
efficient Lisp calling. This is also borne out by the ease in
which non-Lispers understand the disassembled code from Allegro CL's
compiler, and can, for example, recognize a standard function entry
sequence on an x86 as well as any architecture.
.
- References:
- Lisp object code versus that of other languages
- From: jonathon
- Re: Lisp object code versus that of other languages
- From: Thomas F. Bur***
- Lisp object code versus that of other languages
- Prev by Date: Re: novice: mapcan use?
- Next by Date: Re: Lisp object code versus that of other languages
- Previous by thread: Re: Lisp object code versus that of other languages
- Next by thread: Re: Lisp object code versus that of other languages
- Index(es):