Peachpie – PHP Compiler to .NET, Part 2
blog.peachpie.io
blog.peachpie.io
The newest release they're comparing against is 5.4.0 which is from 2012! There were major speed increases in 5.5, and many MUCH bigger ones in 7.
These comparisons aren't remotely fair.
Does anybody have real-world experience with large(ish) projects with Phalanger?
I don't think we need to. It seems self-evident that certain languages excel at different styles of tasks. So if a company is using the best tool for the job, then they are likely doing so in a multi-language environment.
.NET performs better, and not being able to change the code can be considered a feature in some cases.
So you get the best of both worlds.
Try personalizing it: 'I found PHP much easier to learn for ..... but when I wanted xyz performance, .NET performance was abc.'
Give a use case / example where no code changes helped.
As others have said, apparently PHP7 is better than PHP5...
You are (VERY!) unlikely to change the minds of die hard .NET or PHP people, but you'll have a lot more potential with someone who doesn't know either...
"In our last blog post we discussed some of the advantages and shortcomings of PHP and the .NET framework, and pointed out why the two should not be compared with each other. Today, we are introducing a tool that can bridge the gap between these two frameworks, enable the developer to produce code in PHP that is both-way interoperable with .NET, and therefore make use of the specific advantages of both, PHP and the .NET framework:"
I'm pretty sure that's what PHP 5 does already with the opcache.
Looking at non-jit engines, I'm more familiar with jscript/vbscript under active server pages than I am with PHP. But even that engine from 1998 caches the "compiled" bytecode of the page in a scripting engine that can be run on any thread, and can be cloned. Once the engine is finished running the current request, it drops the state from the request and awaits a new request with new state. It never destroys the scripting engine unless an actual file changes. I'm pretty sure that PHP 5.5 is similar in that regard (though I'm certainly not 100%).
So when talking about 'throwing out everything' with each page load, I'm pretty sure that most people are talking about the actual state from the request, not bytecode cache. Compare this with something like nodejs where it's possible to reference a global variable from inside a request handler, and thus have a possibly hidden global dependency. Whereas with ASP/PHP, it's just not possible without making concerted efforts to call out to non-script land.
Specifically, for a non-jitted language, a very reasonable concession to performance is to go ahead and force each request to run in it's own world, and then 'destroy the world', because at that point you can do huge amounts of clean up since you can make a guarantee that no other request could possibly use that request's state.