GNU Info

Info Node: (elisp)Byte Compilation

(elisp)Byte Compilation


Next: Advising Functions Prev: Loading Up: Top
Enter node , (file) or (file)node

Byte Compilation
****************

   Emacs Lisp has a "compiler" that translates functions written in
Lisp into a special representation called "byte-code" that can be
executed more efficiently.  The compiler replaces Lisp function
definitions with byte-code.  When a byte-code function is called, its
definition is evaluated by the "byte-code interpreter".

   Because the byte-compiled code is evaluated by the byte-code
interpreter, instead of being executed directly by the machine's
hardware (as true compiled code is), byte-code is completely
transportable from machine to machine without recompilation.  It is not,
however, as fast as true compiled code.

   Compiling a Lisp file with the Emacs byte compiler always reads the
file as multibyte text, even if Emacs was started with `--unibyte',
unless the file specifies otherwise.  This is so that compilation gives
results compatible with running the same file without compilation.
Note: Loading Non-ASCII.

   In general, any version of Emacs can run byte-compiled code produced
by recent earlier versions of Emacs, but the reverse is not true.  A
major incompatible change was introduced in Emacs version 19.29, and
files compiled with versions since that one will definitely not run in
earlier versions unless you specify a special option.  In addition, the
modifier bits in keyboard characters were renumbered in Emacs 19.29; as
a result, files compiled in versions before 19.29 will not work in
subsequent versions if they contain character constants with modifier
bits.

   Note: Compilation Errors, for how to investigate errors occurring
in byte compilation.

Speed of Byte-Code
An example of speedup from byte compilation.
Compilation Functions
Byte compilation functions.
Docs and Compilation
Dynamic loading of documentation strings.
Dynamic Loading
Dynamic loading of individual functions.
Eval During Compile
Code to be evaluated when you compile.
Byte-Code Objects
The data type used for byte-compiled functions.
Disassembly
Disassembling byte-code; how to read byte-code.

automatically generated by info2www version 1.2.2.9