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

Native Code Compilation

A native code file is a platform-specific shared library. Under Windows, native code files typically use the extension .dll. Under Unix and MacOS, native code files typically use the extension .so.

Native code files are loaded into MzScheme with the load-extension procedure (see dynamic extensions in PLT MzScheme: Language Manual).

The native code compiler attempts to optimize a source program so that it runs faster than the source code or byte code version of the program. See section 1.5 for information on obtaining the best possible performance from mzc-compiled programs.

Native code compilation produces C source code in an intermediate stage; your system must provide an external C compiler to produce native code. The mzc compiler cannot produce native code directly from Scheme code.

Except for MacOS, the C compiler and compiler flags used by mzc can be adjusted via command line flags.



PLT