Any idea how a C++ based server would compete against PHP? The last server backend I was working with was a Xeon X7560 with 64-bit Linux and custom socket event loops for 3 Intel server gigabit NICs. The system had in-memory transactional databases and heavy CoW caching framework + custom xml parsers adopted from rapidxml. IIRC the performance was around 10 times better than previous Tomcat server.
Originally Posted by werfu
There is more to a PHP vs HHVM test than a single cli initiated benchmark race to completion. I'm running HHVM over at stopforumspam and without it my site would be on its knees. Its runs as a single thread, uses minimal memory compared to a massive PHP fpm pool, dropped my server load from ~10 to ~4 and in my benchmarks for the next code release, completes a testbed IPv6 validity/subnet and range unit test benchmark in 2 seconds compared to 8 seconds in PHP.
To really get the benefits of HHVM, you need to use it in the role for which it was designed, a FastCGI server, not a cli interface.
Last edited by stopforumspam; 08-30-2014 at 05:52 AM.
The last I tested, CGI could handle 10 to 50 times the load vs PHP (also as CGI). With both using FastCGI, the difference was 10 to 150 times. Standard PHP though and over a year old bench.
Originally Posted by caligula
if I had the coding skills, I would write the heaviest page on my site in c++ but in the meantime HHVM is doing a great job.
Originally Posted by curaga
Actually in earlier HHVM releases (right after it went into JIT compiler mode) compared to around the PHP 5.4 days, the HHVM CLI performance was much faster than PHP 5.4 at the time.
Originally Posted by stopforumspam
These benchmarks also show that hhvm isn't so fast as they are selling it to be :
And there's a project called cpoll_cppsp that wons almost all tests but is far from feature complete to develop web applications. But the idea of it is pretty neat and makes easier writing c++ web applications by easily combining html and code.
From a technical point of view hhvm is better but original PHP is catching up in performance.