Re: Lisp object code versus that of other languages
- From: "Jeff M." <massung@xxxxxxxxx>
- Date: 30 Aug 2005 16:18:07 -0700
It depends on your optimization settings. Remember, Lisp takes care of
types for you. So, something as simple as:
(defun add (a b)
(+ a b))
can produce lots of assembly code; it has to handle adding integers,
reals, complex numbers, .... However, now try:
(defun add-optimized (a b)
(declare (fixnum a b))
(the fixnum (+ a b)))
Now that is looking much better and there is still debugging
information in there, so you can declare even more (optimize 3),
(safety 0), (debug 0), and now you're starting to get extremely close
to C.
Jeff M.
.
- References:
- Lisp object code versus that of other languages
- From: jonathon
- Lisp object code versus that of other languages
- Prev by Date: Lisp object code versus that of other languages
- Next by Date: How to compile/link a multiple files with ECL
- Previous by thread: Lisp object code versus that of other languages
- Next by thread: Re: Lisp object code versus that of other languages
- Index(es):
Relevant Pages
|
|