Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,603 members, 7,809,191 topics. Date: Friday, 26 April 2024 at 04:05 AM

Facebook Releases A Php Just-in-time Compiler - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Facebook Releases A Php Just-in-time Compiler (2464 Views)

Java online compiler for swing programs / Pls Help, Website For C/c++ Compiler Free Download Windows 7 / What Is The Average Salary Of A Php Programmer In Lagos (2) (3) (4)

(1) (Reply) (Go Down)

Facebook Releases A Php Just-in-time Compiler by ektbear: 8:26am On Dec 13, 2011
Re: Facebook Releases A Php Just-in-time Compiler by Mobinga: 9:06am On Dec 13, 2011
HipHop has been available for a very long time. However, it's for people who actually have speed problems with PHP, and are under constant load. Not for the common man. Cool though.
Re: Facebook Releases A Php Just-in-time Compiler by Nobody: 9:40am On Dec 13, 2011
Re: Facebook Releases A Php Just-in-time Compiler by Nobody: 9:47am On Dec 13, 2011
Hmmn, maybe i can use it later on. . . .on my 127.0.0.1
Re: Facebook Releases A Php Just-in-time Compiler by ektbear: 10:11am On Dec 13, 2011
This is a different technology from the previous release, right? The old hip-hop was PHP to C++, if I understand it correctly.

This otoh is a JIT compiler.
Re: Facebook Releases A Php Just-in-time Compiler by Mobinga: 10:25am On Dec 13, 2011
Yup!!
Re: Facebook Releases A Php Just-in-time Compiler by Nobody: 11:57am On Dec 18, 2011
sometimes the way i look at it the more you touch PHP the more you notice at a certain point to go advanced you need to know c++,
Re: Facebook Releases A Php Just-in-time Compiler by Nobody: 1:36pm On Dec 18, 2011
^^^Yeap that is very true. Luckily i know some basic C/C++ before i came to web programming, so i am managing to cope. . .
Re: Facebook Releases A Php Just-in-time Compiler by Nobody: 1:41pm On Dec 18, 2011
cuz i saw an article about extending people to create your own functions i know a bit of c++ till pointers the rest am still confused but little by little am getting it, cuz mehn PHP does a lot that wasn't even sure it could it can connect MSWord ,call .NET classes and Java, execute command line application from the system and return the result. i just dey trip but its no rush afterall we're in this for a long while. dhtml how we dey do christmas.
Re: Facebook Releases A Php Just-in-time Compiler by Nobody: 2:04pm On Dec 18, 2011
^^^Not sure yet. There was one small app i did with php/c++ that allows any mail you send on my localhost go into mysql database, so i have like an offline mail system for testing mail stuffs. I made it a bit like fakesendmail except that some of those apps will send mail to your mailbox and will need internet.
This one is very fast, just a few lines of c++ code.
Re: Facebook Releases A Php Just-in-time Compiler by Nobody: 2:15pm On Dec 18, 2011
^^^ thats awesome that way one can test mailing functions mehn gots to read the c++ to the levl that it will help me.
Re: Facebook Releases A Php Just-in-time Compiler by Nobody: 2:28pm On Dec 18, 2011
I will blog it. I wont even mind showing omo_to_dun the code maybe he can help improve it. I just did some patch 'em up very lousy c++ coding, but it solved the problem. But i still feel that speed should increase by a few more seconds if a professional c++ coder touch it.
I used some msdos batch file in some areas where i did not know the c++ functions to use. Then i used php to do some cover up where c++ could have done the work. I used vb6 earlier, but the performance was too poor for a commandline app, i was tempted to use vb.net but gave up - too much dependencies, i wanted something easy and straightforward.

I think i will clean up the code first before blogging it so that the setup instructions will not be too much. That way we keep it professional.
Re: Facebook Releases A Php Just-in-time Compiler by Nobody: 2:29pm On Dec 18, 2011
Or maybe we should sell it
Re: Facebook Releases A Php Just-in-time Compiler by ektbear: 7:21am On Dec 19, 2011
How difficult was it write an extension in C++? And how much did it improve your performance by?
Re: Facebook Releases A Php Just-in-time Compiler by dhtml5: 7:36am On Dec 19, 2011
ekt_bear:

How difficult was it write an extension in C++? And how much did it improve your performance by?
What i was trying to say was that there was much hardcoding in what i did. Fine it worked, but the code is rather too rough and complicated.

Take a look at this line:

[Inside c++] - i wanted to execute the dos command below
system("/wamp/sendmail/save.bat"wink;

[save.bat] - i had some issues, so i had to put that is a batch file because i had issues running that command in c++
\wamp\bin\php\php5.2.9-2\php.exe -f \wamp\sendmail\save.php
Re: Facebook Releases A Php Just-in-time Compiler by Beaf: 12:06am On Dec 20, 2011
HipHop parses PHP into C++. It is not a just in time compiler and it will never be.

HipHop for PHP is a source code transformer for PHP script code. HipHop programmatically transforms PHP source code into highly optimized C++ and then uses g++ to compile it to machine code. HipHop includes a code transformer, a reimplementation of PHP's runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations.[1]

HipHop for PHP can substantially increase the speed of PHP applications. Improvements of web page generation throughput by factors of 2 to 6 have been observed.[2][3]

HipHop was created by Facebook to save resources on its servers. It is being distributed with its over 300,000 lines of source code written in C++ and C as free software under the terms of version 3.01 of the PHP License.

http://en.wikipedia.org/wiki/HipHop_for_PHP
Re: Facebook Releases A Php Just-in-time Compiler by ektbear: 12:14am On Dec 20, 2011
If you click the link in the OP, you'll see that there are two products named "HipHop." This older one, and something newer (a JIT compiler.)
Re: Facebook Releases A Php Just-in-time Compiler by Nobody: 12:57am On Dec 20, 2011
Re: Facebook Releases A Php Just-in-time Compiler by Mobinga: 3:10am On Dec 20, 2011
ekt_bear:

If you click the link in the OP, you'll see that there are two products named "HipHop." This older one, and something newer (a JIT compiler.)
Re: Facebook Releases A Php Just-in-time Compiler by Nobody: 9:02pm On Oct 15, 2016
Beaf:
HipHop parses PHP into C++. It is not a just in time compiler and it will never be.



http://en.wikipedia.org/wiki/HipHop_for_PHP

Well it is

(1) (Reply)

How Much Do You Charge For Your Mobile App creation I need some app developers / Top 10 Richest Software Programmers In The World / How Good Are Nigerian Programmers?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 33
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.