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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id A0C65BBAF for ; Wed, 24 Nov 2010 08:20:52 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUBADNL7EzUGyoDkWdsb2JhbACDTp8mFgECCQsREQMfrBKQc4EigzdzBIpfgw8a X-IronPort-AV: E=Sophos;i="4.59,247,1288566000"; d="scan'208";a="89226870" Received: from smtp3-g21.free.fr ([212.27.42.3]) by mail1-smtp-roc.national.inria.fr with ESMTP; 24 Nov 2010 08:20:51 +0100 Received: from [192.168.0.10] (unknown [78.192.0.38]) by smtp3-g21.free.fr (Postfix) with ESMTP id E5894A6133; Wed, 24 Nov 2010 08:20:44 +0100 (CET) Message-ID: <4CECBCCD.4000609@frisch.fr> Date: Wed, 24 Nov 2010 08:20:45 +0100 From: Alain Frisch User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: Dario Teixeira Cc: Benedikt Meurer , Yoann Padioleau , caml-list@yquem.inria.fr Subject: Re: [Caml-list] OCamlJit 2.0 References: <980786.74593.qm@web111507.mail.gq1.yahoo.com> In-Reply-To: <980786.74593.qm@web111507.mail.gq1.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; frisch:01 frisch:01 compiler:01 2.0:98 javascript:98 javascript:98 wrote:01 caml-list:01 alain:01 alain:01 compiling:02 idiomatic:02 optimizing:03 naive:03 interpreter:07 On 11/19/2010 8:46 PM, Dario Teixeira wrote: > Actually, Facebook has a compiler that transforms PHP source code into C++ [1], > and they claim a 50% reduction in CPU usage. I haven't looked into this project, but I've a hard time believing this is a better approach than compiling PHP to Javascript. The translation would probably produce quite idiomatic Javascript code on which modern interpreters do an amazing job (and they keep improving). These interpreters focus on optimizing what made naive Javascript interpreters so slow and I assume the typical PHP interpreter has poor performance for the same reasons. -- Alain