Thomas A. Russ <firstname.lastname@example.org> wrote:
| verec <email@example.com> writes:
| > On 2006-08-12 20:33:51 +0100, firstname.lastname@example.org said:
| > > 1. Note that the call to TIME also tells you that your function was
| > > interpreted, not compiled.
| > CL-USER 58 > (compile 'pi/2-opt)
| > ;;;*** Warning in PI/2-OPT: The definition of PI/2-OPT is already compiled.
| > PI/2-OPT
| > ((PI/2-OPT #<STYLE-WARNING 100B2BDF>))
| > NIL
| > It already was compiled :-(
| The function PI/2-OPT may have been compiled, but what you tested with
| TIME was the following:
| (time (dotimes (i 10000) (pi/2-opt)))
| and the DOTIMES loop is interpreted, not compiled.
Interesting. In CMUCL, TIME always compiles the form to be timed:
cmu> (time (dotimes (i 100000000)))
; Compiling LAMBDA NIL:
; Compiling Top-Level Form:
; Evaluation took:
; 0.11f0 seconds of real time
; 0.11f0 seconds of user run time
; 0.0f0 seconds of system run time
; 200,529,433 CPU cycles
; 0 page faults and
; 0 bytes consed.
Rob Warnock <email@example.com>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607