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.

Do we have example of big companies porting their whole codebase to another 
language ?


>> 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

Reply via email to