Re: array initialization: dimension list not constant
- From: Barry Margolin <barmar@xxxxxxxxxxxx>
- Date: Fri, 31 Mar 2006 11:28:51 -0500
In article <muxmzf6k8tv.fsf@xxxxxxxxxxxxxxxxxx>,
Didier Verna <didier@xxxxxxxxxxxxx> wrote:
Just to be sure ...
in something like (make-array (* width height) ...)
CMUCL might complain that the dimension list is not constant, so it cannot
open-code the array creation routine.
This has an impact on the performance of the array creation, but not on
subsequent operations onto the array, right ?
If the compiler knows the size of the array, it may be able to optimize
some array bounds checks, perhaps even warn you about exceeding them.
For instance, it could conceivably reject this code:
(let ((new-array (make-array 3)))
(setf (aref new-array 4) 'x)
new-array)
--
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:
- array initialization: dimension list not constant
- From: Didier Verna
- array initialization: dimension list not constant
- Prev by Date: Re: Is this a good use for restart-bind?
- Next by Date: Re: Common Lisp implementations are still multiple times slower than C
- Previous by thread: array initialization: dimension list not constant
- Next by thread: Scheme Workshop 2006
- Index(es):
Relevant Pages
|