Common Lisp: compilation vs evaluation

Viewed 1968

On Emacs + Slime with sbcl, once I define a function (or more) in a file I have two choices:

  • Evaluation: e.g. with C-M-x eval-defun
  • Compilation: e.g. with C-c M-k compile-file

The second one produces a .fasl file, too.

What are the differences between the two?

What's going on under the hood when I compile a definition / a file?

What are the Pros and Cons of each one?

4 Answers
Related