Programmers: have you tried out Facebook's PHP-to-C compiler?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Davy
    Confirmed User
    • Apr 2006
    • 4323

    #1

    Programmers: have you tried out Facebook's PHP-to-C compiler?

    A small group of developers at facebook has programmed a compiler that converts php code into C programs. They named it "Hip Hop" () and say it reduces the CPU load by 50%.
    HipHop is a source code transformer which transforms PHP source code into highly optimized C++ and then compiles it using g++.
    https://github.com/facebook/hiphop-php

    Anybody tried it out? Sounds very interesting!
    ---
    ICQ 14-76-98 <-- I don't use this at all
  • k0nr4d
    Confirmed User
    • Aug 2006
    • 9231

    #2
    This really wouldn't help the vast majority of php scripts. It's usually unoptimized mysql queries and over-use that causes load problems, not php. The actual PHP on most scripts has negligable impact on cpu usage...
    Mechanical Bunny Media
    Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development

    Comment

    • Klen
      • Aug 2006
      • 32234

      #3
      Interesting,this could be used as method of code encoding,since executable code cannot be decoded.

      Comment

      • Serge Litehead
        Confirmed User
        • Dec 2002
        • 5190

        #4
        Originally posted by KlenTelaris
        Interesting,this could be used as method of code encoding,since executable code cannot be decoded.
        do you believe C++ cannot be decompiled?

        Comment

        • Klen
          • Aug 2006
          • 32234

          #5
          Originally posted by holograph
          do you believe C++ cannot be decompiled?
          Yes,if it compile it into same machine code like ordinary program.

          Comment

          • Zyber
            Confirmed User
            • Aug 2001
            • 832

            #6
            Interesting :-)

            Comment

            • input
              Registered User
              • Nov 2010
              • 41

              #7
              That looks really interesting - to be able to run a script as a server daemon certainly has its advantages. Going to check it out on a single index.php file where the index.php is the framework launching block to see if I can get a whole app to run as a daemon.

              Comment

              • Zyber
                Confirmed User
                • Aug 2001
                • 832

                #8
                Good that the source code is also available for inspection.
                Better take a look to see if it contains any nasty spying functions. Running an executable from Facebook directly on your server requires some trust. Do you trust Facebook?

                Comment

                Working...