comp.lang.ada
 help / color / mirror / Atom feed
* Generics and disk overhead
@ 1988-03-02 12:51 Erland Sommarskog
  0 siblings, 0 replies; only message in thread
From: Erland Sommarskog @ 1988-03-02 12:51 UTC (permalink / raw)



The scene: Four generic packages, a list handler(L), a queue and
stack handler(QS), a binary-tree handler(B) and a package for 
topological sorting(T). Some of the procedures in B are also generic.
Add to this a main program (M). Now M instantiates T, which instantiates 
B and QS and also some of the procedures in B. Finally QS instantiates L. 
All packages have a limited type parameter. The size of the code was
around 1100 lines, including comments, in kbytes around 40.

After compilation and linking this expanded to 900 kbytes! I find 
that quite extreme. My environment is VADS 5.41, 4.3 BSD and VAX. 
VADS uses the DIANA format, and these files are also the big 
consumers of disk space, but I have no idea if it is really 
necessary.
  To compare I also compiled and linked the program on VMS with
DEC-Ada. This costed 430 blocks or 220 kbytes. Somewhat more
reasonable. However, DEC does cheat. Recompiling a generic body
invalidates the instantiations. On the other hand recompilation 
with seven reinstantiations took a good time with VADS.

I'm not really sure whether DEC's cheating is permitted or not. The
paragraph in question would be 10.3(7-9). Anyone who knows? But
VADS seems definitely to be doing it wrong. Under some circumstances
the library acts as if a generic body was dependent of its instantiation.
-- 
Erland Sommarskog       
ENEA Data, Stockholm        
sommar@enea.UUCP           "Souvent pour s'amuser les hommes d'equipages
                            and it's like talking to a stranger" -- H&C.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1988-03-02 12:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1988-03-02 12:51 Generics and disk overhead Erland Sommarskog

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox