[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Pierre Weis <Pierre.Weis@i...> |
| Subject: | Re: tiny toplevel |
> Hello, > > I know it is possible to create (specific) toplevels > by adding some stuff to the original toplevel but... > is it possible to do the reverse, i.e creating toplevels > by removing some (supposed) unnecessary libraries/components ?? > > By the way, what's the size of the "smallest" possible toplevel > (if 'smallest' make sense...) ?? > > (why this question ??? well, no particular point but > think > - about comparing "scripting language" interpreters (size) > - about "tiny ocaml" or "embedded ocaml" ... > ) > > [I have no idea about what can be removed from the original toplevel :-) > just a question > ] > Thanks > -- > > Georges MARIANO tel: (33) 03 20 43 84 06 > > INRETS, 20 rue Elisee Reclus fax: (33) 03 20 43 83 59 It is not easy to remove ``unnecessary libraries/components'' from the toplevel executable program, since you need all the compiler anyway, in order to ``interpret'' the language. If you want to remove something, you should probably remove features from the language (for instance use Caml Light instead of Objective Caml!). However, a very simple experiment shows that the Caml toplevels are not extremely big, compared to usual command interpreters: mouton:/$ ps ug USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND weis 7506 0.1 0.7 1564 904 pts/5 S 14:15 0:00 /bin/bash -i weis 7546 0.1 1.2 2840 1652 pts/5 T 14:16 0:00 ocamlrun /usr/bin weis 7656 1.6 0.5 1484 660 pts/5 T 14:17 0:00 camlrun /usr/loca weis 7665 0.0 0.6 2252 844 pts/5 T 14:18 0:00 perl weis 7657 0.0 0.6 2500 876 pts/5 R 14:18 0:00 ps ug Hope this helps, Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/