[previous] [up] [next]     [index]
Next: Native Code Compilation Up: mzc Is... Previous: mzc Is...

Byte Code Compilation

A byte code file typically uses the file extension .zo. The file starts with a regular Scheme expression to test MzScheme's version, followed by #` and the bytecode data.

Byte code files are loaded into MzScheme in the same way as regular Scheme source files (i.e., with load). The #` marker causes MzScheme's reader to load byte codes instead of normal Scheme expressions.

Byte code programs produced by mzc run exactly the same as source code compiled by MzScheme directly (assuming the same set of macros, signatures, and syntax are avilable at compile-time and load-time). In other words, byte code compilation does not optimize the code any more than MzScheme's normal evaluator. However, a byte code file can be loaded into MzScheme much faster than a source code file.



PLT