[
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: | Markus Mottl <mottl@m...> |
| Subject: | Re: tiny toplevel |
On Tue, 08 Aug 2000, ortmann@us.ibm.com wrote:
> > USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> > 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
> Any idea how big Java is?
Interesting question - I tried it out on a Sun Ultra 5:
PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
11183 markusm 1 5 0 3000K 2448K run 0:10 33.63% ocaml
11184 markusm 1 15 0 4232K 2656K run 0:04 18.04% java
11402 markusm 1 5 0 1960K 1272K run 0:01 5.27% ocamlrun
The OCaml-program:
while true do () done
The Java-program (an example of conciseness ;)
class test {
public static void main (String args[]) {
while (true);
}
}
One could argue now that the initial heap settings for Java are larger (I
don't know), but even explicitely setting them to the lowest level does not
allow it to "beat" OCaml:
java -ms1000 test:
11270 markusm 1 5 0 3336K 2480K run 0:05 23.44% java
No match for OCaml (even the toplevel interpreter is smaller), not even to
mention caml-light, which is at least 2-3 times smaller...
I don't know how Java scales up with more interesting programs, but I don't
expect any surprises here... - so if somebody wants to go "embedded", don't
do it with Java... ;)
Best regards,
Markus Mottl
--
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl