[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [spr8255] Labels are slow!



Your problem report has been assigned tracking id spr8255.
Please use it in the subject line of any correspondences
regarding your problem report.

>> While testing some program-generated Lisp-Code, I discovered a strange
>> behaviour of labels in ACL. The two functions below obviously do the
>> same (hm, nothing useful..), but the version with the labels uses about
>> 7.2MB of memory when called a 50000 times; test0, on the other hand,
>> needs only 32 bytes! Of course, there also is a loss of performance, about
>> factor 80 or so. 
>> 
>> (defun test0 (cnode) 
>>   (OR (AND (EQ CNODE 'A) (symbolp cnode)) 
>>       (AND (EQ CNODE 'B) (symbolp cnode))
>>       (AND (EQ CNODE 'C) (symbolp cnode))))
>> 
>> (defun test1 (cnode)
>>   (LABELS ((ZGEN-580 NIL
>> 	     (DECLARE (INLINE ZGEN-579))
>> 	     (OR (AND (EQ CNODE 'A) (ZGEN-579))
>> 		 (AND (EQ CNODE 'B) (ZGEN-579))
>> 		 (AND (EQ CNODE 'C) (ZGEN-579))))
>> 	   (ZGEN-579 NIL (symbolp cnode)))
>>     (ZGEN-580)))

We are aware of this problem, and have made it high priority to fix
it.  Allegro CL 4.2, which is currently in beta, mitigates the problem
somewhat, and a complete fix is high on our list of enhancements for
after 4.2.

Duane Rettig, Franz Inc.        1995 University Avenue, Suite 275
duane@Franz.COM (internet)      Berkeley, CA  94704
uunet!franz!duane (uucp)        Phone: (510) 548-3600; FAX: (510) 548-8253