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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 57280BC57 for ; Tue, 30 Nov 2010 11:48:09 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai8BAC9l9EzRVaE0kGdsb2JhbACjAwgVAQEBAQkJDAcRAx+neYlkghiFQS6IVgEBAwWCDoM0BI5X X-IronPort-AV: E=Sophos;i="4.59,279,1288566000"; d="scan'208";a="80964916" Received: from mail-fx0-f52.google.com ([209.85.161.52]) by mail4-smtp-sop.national.inria.fr with ESMTP; 30 Nov 2010 11:48:09 +0100 Received: by fxm5 with SMTP id 5so4277030fxm.39 for ; Tue, 30 Nov 2010 02:48:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=DNz7oYVpjluMLnE7v3nJ+1HDRQMp8C53tLlz59EBeQY=; b=sCBAMJNYNJGzG23IP7OI5iwSj3uXUCcyXgBUpNAYmsfs/wlVCfWR6Mo1ZrE3xzRBy7 7IwQgg9r0KgymAybD5EK2ToRY588qZxIi6NQdY9ml0iJ5etx2NA64O/e9FZUN6jwW+l8 06g+K7qBCNuHWwsS+zg8F5ZJfbNWyauGtr3HY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=r5GKSiqg18ppTcjfIJh9/FWWHeVYEfS/+wcgFUlBZDSOHnC+jh9d8fQz8J00rT/Fwg H5MdxcR20xU6DxJlQU401tKm6prHU39ebIA1XKBp4jhnZMnYpnUI3iTA7xgjVsk80c/H 2poEe5+Is7Mr8ylgOY+m6r+d4biRKUKOzg2Y0= Received: by 10.223.81.78 with SMTP id w14mr6756720fak.5.1291114088437; Tue, 30 Nov 2010 02:48:08 -0800 (PST) Received: from deb0 ([79.114.97.111]) by mx.google.com with ESMTPS id 21sm1559185fav.41.2010.11.30.02.48.07 (version=SSLv3 cipher=RC4-MD5); Tue, 30 Nov 2010 02:48:07 -0800 (PST) Date: Tue, 30 Nov 2010 12:48:03 +0200 From: =?UTF-8?B?VMO2csO2aw==?= Edwin To: Benedikt Meurer Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] OCamlJIT2 vs. OCamlJIT Message-ID: <20101130124803.7952fca1@deb0> In-Reply-To: <3DCEA910-1382-47E5-876B-059178F8F82E@googlemail.com> References: <3DCEA910-1382-47E5-876B-059178F8F82E@googlemail.com> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocamlopt:01 ocamlopt:01 byte-code:01 stack-based:01 translating:01 byte-code:01 compilation:01 compilation:01 edwin:98 2.0:98 wrote:01 compile:01 caml-list:01 unsafe:01 short:01 On Tue, 30 Nov 2010 09:36:07 +0100 Benedikt Meurer wrote: > Hello everybody, > > I did some final work on OCamlJIT2, and compared the result to > OCamlJIT. The performance measures are presented in the following > tech report (skip straight to section 4 for the performance results): > > http://arxiv.org/abs/1011.6223 > > In short: Performance measured on a P4 "Northwood" (no long mode, > plain x86) 2.4GHz. OCamlJIT2 beats OCamlJIT by a factor of 1.1 to 2.0 > in every benchmark, and - rather surprising - was even able to beat > ocamlopt in the number crunching benchmark (probably an issue with > the x86 backend of ocamlopt). Looks like this happens only on Pentium4: on Core2 and Xeon ocamlopt is still faster on almabench.unsafe, or did I miss something? > > As mentioned by Xavier Leroy and others previously, we probably went > as far as we could go in the direction of JITting the byte-code > virtual machine, while preserving its general stack-based nature and > instruction set. Moving even further means translating the byte-code > to some intermediate form suitable for use with standard compilation > techniques; but as we saw earlier, in an LLVM-based prototype, the > compilation overhead increases dramatically and the benefit of JIT > compilation vanishes. An LLVM-based backend would still be interesting for static compilation, where compile times don't matter much. Did you try comparing an LLVM-based backend with ocamlopt? If it is faster could some of the LLVM passes be ported to ocamlopt's backend? Best regards, --Edwin