From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA30950 for caml-red; Wed, 3 Jan 2001 11:50:36 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA01182 for ; Tue, 2 Jan 2001 20:30:54 +0100 (MET) Received: from miss.wu-wien.ac.at (miss.wu-wien.ac.at [137.208.107.17]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f02JUsb28728 for ; Tue, 2 Jan 2001 20:30:54 +0100 (MET) Received: (from mottl@localhost) by miss.wu-wien.ac.at (8.9.0/8.9.0) id UAA24436; Tue, 2 Jan 2001 20:30:51 +0100 (MET) Date: Tue, 2 Jan 2001 20:30:51 +0100 From: Markus Mottl To: Mattias Waldau Cc: OCAML Subject: Re: JIT-compilation for OCaml? Message-ID: <20010102203051.A18481@miss.wu-wien.ac.at> References: <20010102170753.A4018@miss.wu-wien.ac.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from mattias.waldau@abc.se on Tue, Jan 02, 2001 at 19:16:37 +0100 Sender: weis@pauillac.inria.fr On Tue, 02 Jan 2001, Mattias Waldau wrote: > Why do you want JIT? I don't need it currently, but I can imagine applications that greatly benefit from it. > Do you use Java for regular development? It is a pain, No, I don't use it at all, but I believe you that it must be very painful ;) > the reason is > > 1. Slow, slow > 2. Big, big Maybe that's because the Java JIT-compilers were not written by Xavier? ;) > and the reason that Java gets away with it, is the JIT-compiler. That mean > that after enormous start-time, the program might achieve resonable > performance after a couple of minutes. However, at that time, it still needs > 10-20 extra megs, since the compiler is still loaded into memory. It shouldn't be too difficult to come up with a protocol that informs the interpreter whether it should actually use JIT-compilation or not and if yes, how it should compile the code for optimum performance, etc. This meta information could be generated by passing options to the byte code compiler or maybe even by some kind of pragmas in the source. Or maybe by a magnificent program analysis tool that finds the "hot spots" automatically. > The beatty of Ocaml are the fast compilers, the optimizing compiler is > faster than javac, which only produces bytecode. But the JIT-compiled/interpreted byte code seems to be pretty fast: I have tried it with a few mini-benchmarks to see whether this JIT-technology is of any worth. Really not bad... > It is sad that so few > other programming language developers realizes that the speed of the > development environment matters. Certainly! I definitely don't want to replace the normal byte code interpreter with a purely JIT-one. My motivation was rather portability + speed rather than speed alone. For the latter "ocamlopt" is more than good enough, and for portability we have the byte code compiler. But if you want to have portability with reasonable speed for demanding applications... > The only thing Ocaml can learn from Java is its libraries. If I would invent > a programming language with a library today, I would just copy Java's > interface. Libraries are much harder to learn than programming languages, > thus standards are needed. I haven't tried the Java-libraries so far. The OCaml-ones are quite usable, but if you can tell us what Java has that OCaml is missing, just tell us (in time! ;) - Markus Mottl -- Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl