Re: Explain why calling a named function conses and lambda doesn't?!?!?!?!



jrwats@xxxxxxxxx <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)))
[...]
4,128 bytes consed.

The consing numbers reported by sbcl, which you seem to be using, are
not exact, but can vary by a couple of pages (a page is 4096 bytes on
most sbcl platfroms). Try testing 640 iterations instead.

--
Juho Snellman
.



Relevant Pages

  • Re: multicore lisp?
    ... Juho Snellman wrote: ... web page that SBCL does not care about thread safety,.. ... Duane Rettig wrote: ... Franz quotes SBCL: "work is ongoing". ...
    (comp.lang.lisp)
  • Re: more about DEFCLASS vs DEFSTRUCT
    ... Because I use mainly SBCL, I want to erase the consing. ... generational garbage collector, and these temporary boxes are rather ... Nobody can fix the economy. ...
    (comp.lang.lisp)
  • Re: a bug in SBCL 1.0 under Windows?
    ... Juho Snellman wrote: ... SBCL was not available for Windows. ... I don't really see why this would indicate a bug in SBCL. ... obviously working in a package that's not using the COMMON-LISP ...
    (comp.lang.lisp)
  • Re: Adding typedeclarations to SBCL for optimisations
    ... Juho Snellman wrote: ... I can't seem to get rid of the unsigned-byte to integer ... In that case you're probably using a 64-bit sbcl. ...
    (comp.lang.lisp)
  • Re: tracing a function without knowing its name
    ... (Though beware that TRACE with:ENCAPSULATE NIL doesn't work on all ... platforms that sbcl supports). ... Juho Snellman ...
    (comp.lang.lisp)