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

Re: [spr1787] Compiler Optimization Level


In reply to your questions:

	1. Is there a way for Allegro to tell me what the current 
	   compiler optimization settings (speed/safety) are?  
Yes, there are currently unexported and undocumented variables in 
the compiler package which hold that information.  They are:

Please note that you should not set or bind the values of those
variables explicitly but should either use declarations and 
proclamations as specified for Common Lisp or use the Allegro CL 
top-level command :optimize, of which an example follows.  Also 
note that in the current implementation of :optimize, the default
responses to the speed and safety queries are always 1, the  defaults
for speed and safety recommended for Common Lisp implementations.

As usual, we provide no assurance that the internal variables listed
above will continue to be implemented, or if implemented will continue
to have the same meaning in future versions of Allegro CL.

In fact, there will be a documented way to get the current speed and safety
in Allegro CL 4.0.


<cl> :optimize

A response of ? gets help on possible answers.

compiler optimize speed setting (3 is fastest): [1] 
compiler optimize safety setting (0 is fastest): [1] 
return value for comp:save-locals-names-switch: [NIL] 

Compiler optimize setting is
     (proclaim '(optimize (speed 1) (safety 1)))
and the compiler will not save local names.

	2. Alternatively, is there a way to find out what optimization
	   settings a file is compiled with?  

Unfortunately, not. We will consider this an RFE for a future
implementation of Allegro CL.  

It has been pointed out by someone here that inasmuch as speed and
safety can be declared within certain code bodies, storing information
only about files could lead to erroneous assumptions.

Your inquiry has been assigned a tracking id of spr1787. Please use this
id in the subject line of any related mail so that we may better track 
communications on the issue. 


Lois Wolf, Franz Inc.           1995 University Avenue, Suite 275
lwolf@franz.com (internet)      Berkeley, CA  94704
uunet!franz!lwolf (uucp)        Phone: (415) 548-3600; FAX: (415) 548-8253