Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Compilation Speed

Name: Anonymous 2011-02-16 21:14

I have this code:
http://rghost.net/4410616

And it kills SBCL. But if I replace my-lst with

(defmacro my-lst (&rest xs)
  `(list ,@xs))

it compiles much faster.

Name: Anonymous 2011-02-16 22:25

Basically, the question is:

why, given

(defun vecs1 (n)
  (cons 'vector (loop as i from 0 below n collect (list 'vector 1))))

(defun vecs2 (n)
  (let ((gs (loop as i from 0 below n collect (gensym ""))))
    (labels ((r (xs)
               (if xs
                   `((lambda (,(car xs)) ,(r (cdr xs)))
                     (vector 1))
                   `(vector ,@gs))))
      (r gs))))

, (eval (vecs2 400)) is much slower than (eval (vecs1 400))?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List