Next: Avoid Unnecessary Consing, Up: General Efficiency Hints [Contents][Index]
At this point, the advantages of compiling code relative to running it
interpreted probably need not be emphasized too much, but remember that
in CMUCL, compiled code typically runs hundreds of times faster than
interpreted code. Also, compiled (fasl
) files load significantly faster
than source files, so it is worthwhile compiling files which are loaded many
times, even if the speed of the functions in the file is unimportant.
Even disregarding the efficiency advantages, compiled code is as good or better than interpreted code. Compiled code can be debugged at the source level (see chapter debugger), and compiled code does more error checking. For these reasons, the interpreter should be regarded mainly as an interactive command interpreter, rather than as a programming language implementation.
Do not be concerned about the performance of your program until you see its speed compiled. Some techniques that make compiled code run faster make interpreted code run slower.