From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 12C7CBC57 for ; Tue, 16 Nov 2010 15:52:14 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtoCAJsp4kzRVaE0kGdsb2JhbACUX414CBUBAQEBCQkMBxEDH6ULi3oBBY4SAQSFSw X-IronPort-AV: E=Sophos;i="4.59,206,1288566000"; d="scan'208";a="78970414" Received: from mail-fx0-f52.google.com ([209.85.161.52]) by mail2-smtp-roc.national.inria.fr with ESMTP; 16 Nov 2010 15:52:13 +0100 Received: by fxm15 with SMTP id 15so528355fxm.39 for ; Tue, 16 Nov 2010 06:52:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:message-id:to:mime-version :x-mailer; bh=bsM2E/88yffXuyfcfUrEpzLO+Bi/ii8DvatvwiCWO2g=; b=m/u4tKfGWGUIv1vznkDLH/F+JpX/dKw446aUZ80vWVLGFvTX1QBQBhHFpTwPmN7I8z wf9k81HfSlDPtJV2IOQA+moxX56g0wkcvu5UyQRXWoshF09/kZxmnVhCS9AiIRpyhCD3 y5r9TZOoY0DEna8pq4vv5CswNQmddYyoQgFqA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :to:mime-version:x-mailer; b=huP1c38Vl0l+CToO8KEeg7lU9fn64tfRsa1YT0fg06GXkvNZuuw9Q6gNB7yUdWt4Yb 72PCYaiVV3M2mDRj9LSeq62bE1rhZRBmEWhuxmsoQgBn0dce9JI1bkm2VceHWXtt96Jz SBh/Fs6Mi+Eu+5Z/Rp0xTSlNnfGOMwM07yzuU= Received: by 10.223.83.196 with SMTP id g4mr1203214fal.63.1289919133210; Tue, 16 Nov 2010 06:52:13 -0800 (PST) Received: from bespin.kosmos.all (ip-95-223-170-32.unitymediagroup.de [95.223.170.32]) by mx.google.com with ESMTPS id y13sm1309655fah.2.2010.11.16.06.52.06 (version=SSLv3 cipher=RC4-MD5); Tue, 16 Nov 2010 06:52:11 -0800 (PST) From: Benedikt Meurer Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: OCamlJit 2.0 Date: Tue, 16 Nov 2010 15:52:05 +0100 Message-Id: To: caml-list@yquem.inria.fr Mime-Version: 1.0 (Apple Message framework v1081) X-Mailer: Apple Mail (2.1081) X-Spam: no; 0.00; ocaml:01 byte-code:01 ocamlrun:01 ocaml:01 byte-code:01 compilation:01 translating:01 runtime:01 hashing:01 prototyping:01 speedup:01 compiler:01 -prefix:01 ocamlrun:01 lib:01 Hello everybody, OCamlJit 2.0 is a new Just-In-Time engine for Objective Caml 3.12.0 on = desktop processors (x86/x86-64). It translates the OCaml byte-code used = by the interpreter (ocamlrun and ocaml) to x86/x86-64 native code = on-demand and runs the generated native code instead of interpreting the = byte-code. It is designed to run with minimal compilation overhead = (translating only what is being executed, avoiding costly code = generation and optimization techniques), while being 100% compatible = with the byte-code runtime (including serialization and hashing of = closures, etc.). OCamlJit 2.0 was specifically designed for desktop processors and is not = really portable to anything else in its current shape, because the = target audience are people using the interactive top-level and the = byte-code interpreter for rapid prototyping/development (which is = unlikely to happen on anything else but x86/x86-64). The implementation = currently requires a system that adheres to the SysV ABI, which includes = Linux, BSD, OS X, but excludes Win32/Win64 (patches/ideas are welcome). = It was tested on Linux/x86 (Debian), Linux/amd64 (CentOS) and Mac OS X = 10.6 (64bit). The x86 implementation requires SSE2 capable processors = (otherwise it falls back to the byte-code interpreter), so it won't = speedup your OCaml programs running on 486 CPUs. :-) OCamlJit 2.0 runs most benchmarks at 2-6 times faster than the byte-code = interpreter. The interactive top-level benefits twice when used with the = JIT engine: (a) the compiler stages are JIT compiled and (b) the = generated byte-code is JIT compiled. A tech report describing a slightly = earlier prototype and including performance measures of OCamlJit 2.0 on = Mac OS X (64bit) is available at: http://arxiv.org/abs/1011.1783 The source code is available from the Git repository (master branch) at: http://gitorious.org/ocamljit2/ocamljit2 Installation is similar to installation of Objective Caml, just run ./configure -prefix /path/to/ocamljit2 [options] followed by make world opt make install This will install a fully working Objective Caml 3.12.0 to = /path/to/ocamlji2, where /path/to/ocamljit2/bin/ocamlrun and = /path/to/ocamljit2/lib/libcamlrun_shared.so include the JIT engine in = addition to the byte-code interpreter (fallback to the byte-code = interpreter is necessary for debugging with ocamldebug). The configure = script prints a line indicating whether the JIT engine is enabled or not = (if not, it'll be just a regular OCaml 3.12 installation). Comments are welcome. Enjoy! Benedikt Meurer