Notes about the Implementation of Compiler Macros (original) (raw)
3.2 Compilation 3.2.2 Compilation Semantics
3.2.2.1 Compiler Macros
3.2.2.1.3 When Compiler Macros Are Used
3.2.2.1.3.1 Notes about the Implementation of Compiler Macros
Although it is technically permissible, as described above, for eval to treat compiler macros in the same situations as compiler might, this is not necessarily a good idea in_interpreted implementations_.
Compiler macros exist for the purpose of trading compile-time speed for run-time speed. Programmers who write compiler macros tend to assume that the compiler macros can take more time than normal _functions_and macros in order to produce code which is especially optimal for use at run time. Since eval in an interpreted implementationmight perform semantic analysis of the same form multiple times, it might be inefficient in general for the implementation to choose to callcompiler macros on every such evaluation.
Nevertheless, the decision about what to do in these situations is left to each implementation.