The way this is defined now, the optimization applies during compilation, and after loading it applies to everything that is compiled afterwards in the same process.
Presumably, it is intended to apply only to the compilation of the file, in which case the list of keywords should includng only :compile-toplevel.
https://github.com/mmaul/clml/blob/c34cc7a7c041d3f99e5d3bc5b4abf5caaedfd1dd/som/src/fileio.lisp#L6
The way this is defined now, the optimization applies during compilation, and after loading it applies to everything that is compiled afterwards in the same process.
Presumably, it is intended to apply only to the compilation of the file, in which case the list of keywords should includng only :compile-toplevel.
https://www.lispworks.com/documentation/lw50/CLHS/Body/s_eval_w.htm
This applies to all the file wiyh (proclaim (optimize...