Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news.harvard.edu!news2.near.net!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!pipex!uknet!festival!edcogsci!usenet
From: tfb@cogsci.ed.ac.uk (Tim Bradshaw)
Subject: Stopping fp functions consing in CMUCL
Message-ID: <TFB.94Sep7120427@burns.cogsci.ed.ac.uk>
Sender: usenet@cogsci.ed.ac.uk (C News Software)
Nntp-Posting-Host: burns
Organization: Centre for Cognitive Science, University of Edinburgh
Date: Wed, 7 Sep 1994 11:04:27 GMT
Lines: 19

[I hope the previous article I just cancelled didn't get out, sorry if
it did]

Is it possible, without block compiling things, to stop functions
returning floats from consing in order to return a value in CMUCL?
I've been trying to write code using smaller functions rather than my
usual humungous pieces of pseudo-fortran and makes life hard: if I
want to find and stamp out spurious consing, then I need to either
understand everything or to profile the code.  If I use block
compilation profiling doesn't work, if I don't it conses spuriously.

A slightly deeper question: given the semantics of CL (note *not*
Lisp-in-general) -- ie that you can redefine functions at least -- is
it really possible to avoid this sort of consing at *all*?  I never
really understand whether a declaration of a function's type (esp its
return type) allows a caller to do some quick and cons-free thing to
get the result back from it -- I suppose doing whatever block
compiling does -- or do you have to play safe because it could be
redefined with a different type later?
