Lisp HUG Maillist Archive

delivery - how small?

How small is the smallest delivery?  Under LWW, the code below results in an 
executable of about 4M.  

Are there any tricks that I'm missing to squeeze the size down?

Something similar, under Microsoft C (linked with static libs, not DLL's) 
results in a 400K executable (and this fact is repeatedly pointed out to me 
by my c-weenie colleagues).

I don't have an "intuition" as to what makes up the 4M of delivered lisp 
executable - if anyone can elaborate, I'd be interested to know.

Thanks!
pt

== hello.lisp ==

(proclaim '(optimize (debug 0) (safety 0) (speed 1) (space 3)))

(in-package "CL-USER")

(defun hello-world ()
  (capi:display-message "Hello World!"))


== deliver.lisp ==

(load-all-patches)
(compile-file "hello" :load t)
(deliver 'hello-world "hello" 5 :interface :capi)
(quit)

== deliv.bat ==

"\program files\xanalys\lispworks\lispworks-4300.exe" -init deliver.lisp



Re: delivery - how small?

On 01 Jun 2004, at 18:20, tarvydas wrote:

> How small is the smallest delivery?  Under LWW, the code below results 
> in an
> executable of about 4M.
>
> Are there any tricks that I'm missing to squeeze the size down?
>
> Something similar, under Microsoft C (linked with static libs, not 
> DLL's)
> results in a 400K executable (and this fact is repeatedly pointed out 
> to me
> by my c-weenie colleagues).
>
> I don't have an "intuition" as to what makes up the 4M of delivered 
> lisp
> executable - if anyone can elaborate, I'd be interested to know.

On my system (LWM, PowerBook, Mac OS X) delivering the Othello example 
results in a 7MB executable which compresses to a 1.4MB othello.tar.bz2 
for distribution - I think this is excellent. Standard applications on 
my system like the Safari browser (14 MB), the Mail client (4MB), the 
QuickTime Player (11 MB), the RealOne Player (14Mb), to name a few, are 
in the same order of magnitude concerning application size. Memory 
consumption is comparable as well (order of magnitude-wise).

Granted, a native Cocoa tool can be as small as a few hundred KB, 
starts instantly and consumes a small amount of memory.

You have to think of a delivered LW app as a Java application that 
ships with its own (somewhat stripped) Java runtime.

Compared to Java, LW apps use less memory and start up faster.

It would be possible to have some generic LW shell installed on your 
system and ship LW apps as compiled FASL files that are loaded and 
executed into that shell. Those compiled files would be much smaller 
than a complete delivered LW app. Running multiple of those apps would 
be more efficient.

Ultimately, it all depends on what you are trying to build and for what 
audience.

Sven


Re: delivery - how small?

* tarvydas  wrote:
> Something similar, under Microsoft C (linked with static libs, not DLL's) 
> results in a 400K executable (and this fact is repeatedly pointed out to me 
> by my c-weenie colleagues).

Wouldn't it be fairer to compare something more approaching like with
like?  For instance compare the LW delivery size with the smallest
statically linked Java application (or a Java application bundled with
the JVM and appropriate other runtime).

--tim


Updated at: 2020-12-10 08:56 UTC