Comment 4 for bug 1886818

Revision history for this message
Douglas Katzman (dougk) wrote :

Your function is enormous - the compiler conses about 1.3GB while digesting it, and it produces over 200KB of assembly code, and it finds >700 "externally callable" functions inside one function (anything bound in WITH-SIMPLE-RESTART etc is a callable function).

As a practical matter, the compiler is designed to work with typical lisp code, which this is not.
So while there may be an issue with GC not running often enough, there are definitely some scaling issues with regard to compiler internals. i.e. the choices of algorithms aren't designed to deal with this. And perhaps our expansion of WITH-SIMPLE-RESTART is fairly heavyweight.

If you "need" this to work keeping the same shape of that function, I might suggest refactoring it to use a CALL-WITH pattern.
Just defining (TEST-EQ) to expand into `(CALL-WITH-TEST-EQ (lambda () (something)) reduces compiler consing down to 75MB and speeds up compilation by 50x.