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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id ADA6ABC57 for ; Sat, 20 Nov 2010 18:15:50 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwBAJeR50zU4xEKkGdsb2JhbACDRZBsjjQVAQEBAQkJDAcRAx+qSpA6AoEggzZzBIcNhl8 X-IronPort-AV: E=Sophos;i="4.59,229,1288566000"; d="scan'208";a="67555111" Received: from moutng.kundenserver.de ([212.227.17.10]) by mail3-smtp-sop.national.inria.fr with ESMTP; 20 Nov 2010 18:15:46 +0100 Received: from office1.lan.sumadev.de (dslb-084-059-079-167.pools.arcor-ip.net [84.59.79.167]) by mrelayeu.kundenserver.de (node=mreu0) with ESMTP (Nemesis) id 0LckSJ-1OdxSB1DUt-00k6Zh; Sat, 20 Nov 2010 18:15:44 +0100 Received: from [192.168.0.29] (dslb-084-058-039-135.pools.arcor-ip.net [84.58.39.135]) by office1.lan.sumadev.de (Postfix) with ESMTPA id C56F85F702; Sat, 20 Nov 2010 18:15:43 +0100 (CET) Subject: Re: [Caml-list] [Was: OCamlJit 2.0] From: Gerd Stolpmann To: Yoann Padioleau Cc: Benedikt Meurer , caml-list@yquem.inria.fr In-Reply-To: <6366332A-5DAC-469D-94A4-744E569CA3B0@wanadoo.fr> References: <980786.74593.qm@web111507.mail.gq1.yahoo.com> <023DB1B5-B4D6-4C2A-AAF6-2368F93BEBB6@wanadoo.fr> <201011201619.47211.vincent.balat@pps.jussieu.fr> <6366332A-5DAC-469D-94A4-744E569CA3B0@wanadoo.fr> Content-Type: text/plain; charset="UTF-8" Date: Sat, 20 Nov 2010 18:15:42 +0100 Message-ID: <1290273342.16005.339.camel@thinkpad> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:h90nUjcYjgu+Yqdv3PXxVOHXGQvpmXqFCmto2UggaZJ glYVHmrcmccxmFmTPQvAx+jBIi3obrLaUd1HTy47Kl7Gr4TRQN 6xnqQn8gEBOyrahwD2IdtJLEZG/g+K63/VC4EJcM9MAdrl2htM NyB3vzCRG8RZtcdmB7tZJ4BqJsI6+kbkAJGPrmTZbkXrJ45Llv Dp1eMY2YHXVBXQwt1Uj0g== X-Spam: no; 0.00; gerd:01 stolpmann:01 compiler:01 speedup:01 bytecode:01 reimplement:01 ocaml:01 ocaml:01 gerd:01 bytecode:01 compiler:01 haskell:01 beginner's:01 bug:01 beginner's:01 Am Samstag, den 20.11.2010, 08:10 -0800 schrieb Yoann Padioleau: > On Nov 20, 2010, at 7:42 AM, Benedikt Meurer wrote: > > > > > On Nov 20, 2010, at 16:19 , Vincent Balat wrote: > > > >> On Nov 19, 2010 21:20:01, Yoann Padioleau wrote: > >>> On Nov 19, 2010, at 11:46 AM, 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. > >>> > >>> Yes, which is good. But if you think about it is "only" a x2 speedup vs a > >>> really slow bytecode interpreter (the Zend PHP interpreter). PHP is known > >>> for being more than 30 times slower than C. > >>> It's even slower than Ruby on > >>> http://shootout.alioth.debian.org/u32/which-programming-languages-are-fast > >>> est.php There are lots of opportunities to do better IMHO. > >> > >> Would it be completely inconceivable for a company like facebook to > >> reimplement everything using a fast well designed typed language > > I think it is inconceivable. I doubt facebook will switch to ocaml and ocsigen tomorrow :) > The problem is how to migrate code to another language smoothly ? You can not > stop all development for a month and say "Hey everybody, we are porting > our 10 millions lines of code of PHP to X.". The reason C++ succeeded was > because there was a smooth migration path. C code is valid C++ code. You > can incrementally add objects to an existing codebase. It's not a matter of the technical migration. You simply wouldn't find enough engineers that can master a "fast well designed typed language" (assuming here you have the more advanced ones in mind :-) ). Also, there is the question whether it is the best approach to let the most talented developers in the company program the user interface, with day-to-day tasks like "hey Joe, can you please fix this broken link". (Not that there are also complicated UI's but these are rare.) At Mylife.com (where I'm currently consulting for) large parts of the backend are now running in Ocaml, but the web frontend is done by another team, and there is PHP involved. IMHO, it would be a misallocation of human resources if we (the Ocaml team) also did the frontend. > Do we have example of big companies porting their whole codebase to another language ? Usually languages are only switched when a completely new project is started. Gerd > >> instead of "spending hundreds of millions of dollars on machines that run PHP > >> bytecode interpreters"? (quoting Yoann) > > Apparently they decided to keep PHP and switch from a slow bytecode interpreter > to a 2x-faster compiler. > > > > > It's probably not a technical decision, but more likely a marketing decision. If you tell Joe > > Who is Joe ? A developer ? A user ? A venture capitalist ? > > > that your webservices run on Java, PHP or .NET, he'll say "great", "sure" or "wow" (not because Joe's familiar with the technology or the theory, but because he's familiar with the terms). Tell Joe your webservices run on OCaml or Haskell and the best answer you can get will be "what?". > > I doubt any user care about how facebook is implemented. Twitter and Foursquare run on Scala and > this is not a very popular language. > > > > > >> Vincent [not completely joking] > > > > Benedikt > > _______________________________________________ > > Caml-list mailing list. Subscription management: > > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > > Archives: http://caml.inria.fr > > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > > Bug reports: http://caml.inria.fr/bin/caml-bugs > > > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- ------------------------------------------------------------ Gerd Stolpmann, Bad Nauheimer Str.3, 64289 Darmstadt,Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de Phone: +49-6151-153855 Fax: +49-6151-997714 ------------------------------------------------------------