Re: Explain why calling a named function conses and lambda doesn't?!?!?!?!
- From: Barry Margolin <barmar@xxxxxxxxxxxx>
- Date: Thu, 27 Sep 2007 20:34:00 -0400
In article <1190934734.942081.25460@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
jrwats@xxxxxxxxx wrote:
CHESS> (defun black ()
(logior (aref *black* *PAWN*)
(aref *black* *KNIGHT*)
(aref *black* *BISHOP*)
(aref *black* *ROOK*)
(aref *black* *QUEEN*)))
CHESS> (time (dotimes (i 64) (black)))
Evaluation took:
0.0 seconds of real time
0.0 seconds of user run time
0.0 seconds of system run time
0 calls to %EVAL
0 page faults and
4,128 bytes consed.
NIL
CHESS> (time (dotimes (i 64) (funcall (lambda ()
(logior (aref *black* *PAWN*)
(aref *black* *KNIGHT*)
(aref *black* *BISHOP*)
(aref *black* *ROOK*)
(aref *black* *QUEEN*))))))
Evaluation took:
0.0 seconds of real time
0.0 seconds of user run time
0.0 seconds of system run time
0 calls to %EVAL
0 page faults and
0 bytes consed.
NIL
Does this still happen if you compile the BLACK function?
--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.
- References:
- Prev by Date: Re: How to implement heap as a binary tree in lisp?
- Next by Date: Re: Explain why calling a named function conses and lambda doesn't?!?!?!?!
- Previous by thread: Explain why calling a named function conses and lambda doesn't?!?!?!?!
- Next by thread: Re: Explain why calling a named function conses and lambda doesn't?!?!?!?!
- Index(es):
Relevant Pages
|