while profiling code which depends on foreign sizes, i observed that foreign-type-size was doing most of the work. this (so it seems) due to the circularity check.
is there some reason that there is no logic to decide to push the process into compile-time where it is possible?
something like:
(define-compiler-macro foreign-type-size (&whole form type) (cond ((or (keywordp type) (typep type '(cons (eql :struct)))) (foreign-type-size type)) ((and (symbolp type) (constantp type)) (foreign-type-size (symbol-value type))) (t form)))