From: Fernando Mato Mira
Subject: EXAMPLE: Why isn't LISP a mastream language
Date: 
Message-ID: <1993Jan29.192102@di.epfl.ch>
I found out this today while running Allegro CL 4.1 
(Inline disclaimer: Franz support is very good, so I guess they will fix this real soon)

USER(277): (compile 'foo 
	    '(lambda  ()
	      (dotimes (i 1000)
		(make-sequence '(vector cons 10) 10))))
FOO
NIL
NIL
USER(278): (compile 'bar 
	    '(lambda ()
	      (dotimes (i 1000)
		(make-array '10 :element-type 'cons))))
BAR
NIL
NIL
USER(279):  (PROFILER:WITH-PROFILING (:START-SAMPLING-P T :TYPE :SPACE)
	      (foo))
NIL
USER(280): (profiler:show-call-graph)
Space profile of sampled pc values by function, children, and parents.

Total mem.s below 1.0% will be suppressed.
Parent and child mem.s less 2.0% of the node will be suppressed.

Sample represents 432.0 Kbytes of space allocated (out of a total of 432.0) ******
		  ^^^^^
  %     %                       Parent
 self total   total local  Function
 Mem.  Mem.   Kbyte   %         Child

[beginning of long call graph deleted]
-----------------------------------------------------
                 40 100.0        EXCL::MAKE-ARRAY-SIMPLE
  9.3   9.3      40 100.0   "make_svector"
-----------------------------------------------------
USER(282): (PROFILER:WITH-PROFILING (:START-SAMPLING-P T :TYPE :SPACE)
	     (bar))
NIL
USER(283): ::show
(PROFILER:SHOW-CALL-GRAPH)
Space profile of sampled pc values by function, children, and parents.

Total mem.s below 1.0% will be suppressed.
Parent and child mem.s less 2.0% of the node will be suppressed.

Sample represents 56.0 Kbytes of space allocated (out of a total of 56.0)   ******
		  ^^^^
  %     %                       Parent
 self total   total local  Function
 Mem.  Mem.   Kbyte   %         Child

  0.0 100.0      56   0.0   "start"
                 56 100.0        "startup_lisp"
-----------------------------------------------------
                 56 100.0        "start"
  0.0 100.0      56   0.0   ... "startup_lisp"
                 56 100.0        ... EVAL
-----------------------------------------------------
                 56 100.0        ... "startup_lisp"
  0.0 100.0      56   0.0   ... EVAL
                 56 100.0        ... BAR
-----------------------------------------------------
                 56 100.0        ... EVAL
  0.0 100.0      56   0.0   BAR
                 56 100.0        "make_svector"
-----------------------------------------------------
                 56 100.0        BAR
100.0 100.0      56 100.0   "make_svector"
-----------------------------------------------------
And just in case:

USER(287): (type-of (make-sequence '(vector cons) 10))
(SIMPLE-ARRAY T (10))
USER(287): (type-of (make-sequence '(vector cons 10) 10))
(SIMPLE-ARRAY T (10))
USER(288): (type-of (make-array 10 :element-type 'cons))
(SIMPLE-ARRAY T (10))

So you see that even when you are sure that the compiler is very good,
two seemingly performance-equivalent expressions can hide some surprises.

-- 
Fernando D. Mato Mira
Computer Graphics Lab			   "Only CLOS is good enough"
Swiss Federal Institute of Technology	       (ay, ay ,ay ...)
········@di.epfl.ch

NeXTMail : ········@lignext.epfl.ch
FAX 	 : +41 (21) 693 - 5328

Disclaimer:

disclaim([],[]).
disclaim([H|T],[DH,DT]) :- fixed-point-disclaimer(H,DH),
			   disclaim(T,DT).
fixed-point-disclaimer(Text,fixed-point-disclaimer(Text,_)).
From: Fernando Mato Mira
Subject: Re: EXAMPLE: Why isn't LISP a mastream language
Date: 
Message-ID: <1993Feb3.085844@di.epfl.ch>
They've fixed it:

MAKE-SEQUENCE: Sample represents 64.0 Kbytes of space allocated (out of a total of 64.0)
MAKE-ARRAY:    Sample represents 56.0 Kbytes of space allocated (out of a total of 56.0)

Of course, there are still some 8Kb floating around, but when you think that
just yesterday I was told they were going to take a look at it, the savings of "only" (4xx - 8)K is not bad at
all.

-- 
Fernando D. Mato Mira
Computer Graphics Lab			  "There is only one Language
Swiss Federal Institute of Technology	    and McCarthy is its prophet"
········@di.epfl.ch

FAX 	 : +41 (21) 693 - 5328

Disclaimer:

disclaim([],[]).
disclaim([H|T],[DH,DT]) :- fixed_point_disclaimer(H,DH),
			   disclaim(T,DT).
fixed_point_disclaimer(Text,fixed_point_disclaimer(Text,_)).