Rasmus, I'm looking at that first chart you linked to, the one about
real world Wordpress performance. It has three lines on it. The
terrible one is standard PHP without a bytecode cache. Nobody in their
right mind runs PHP without a bytecode cache. It's only there to make
the chart look more exciting.

The second one is standard PHP (the Zend VM) with Wincache. Wincache
is a Microsoft-supplied alternative to APC for the Windows platform.
Fine by me since APC seemed semi-orphaned on Windows the last time I
checked. Whatever, a bytecode cache is a bytecode cache.

The third line is Phalanger. And yes, it's a little faster than
standard PHP with a reasonable cache installed. But not much.

The micro-benchmarks for individual features are more interesting, but
I'd like to know why they don't matter so much in practice.

On Fri, Dec 9, 2011 at 8:58 AM, Rasmus Schultz <ras...@mindplay.dk> wrote:
> You want to compare Mono performance to .NET performance - I'm sorry, but I
> don't see how that's even relevant?
>
> Your benchmark would be relevant if I was proposing you write a PHP
> interpreter and run that on Mono.
>
> What I'm proposing (and what Phalanger does) is to compile PHP code to CLR
> bytecode, and running it directly on the VM - I'm not saying run an
> interpreter under the VM. That would be pointless.
>
> So what you should be comparing, is Mono performance against PHP
> performance. What you should be comparing is probably something closer to
> this:
>
> http://shootout.alioth.debian.org/u64q/performance.php?test=spectralnorm
>
> (and I realize of course that CLR bytecode derived from a dynamic language
> like PHP was have a considerably higher runtime overhead than that of a
> static language like C#, but it should still be orders of magnitude faster
> than an interpreter.)
>
> According to the chart you mentioned, Mono performance on Linux is
> comparable to that of Java - which has performed adequately to support a
> very large industry and thousands of languages.
>
> Sure, .NET is orders of magnitude faster than that. But it is optimized for
> a single platform, and if we're looking at cross-platform VM alternatives,
> your two best choices are Mono and Java - .NET should not even be in that
> chart, except for the sake of argument that Mono has room for optimization
> still.
>
> Also, according to your chart, Mono has considerably lower memory usage,
> which could be relevant when running highly parallelized applications such
> as web-services.
>
> Here's another chart I'm sure you've all seen, comparing the Windows build
> of PHP to Phalanger:
>
> http://www.php-compiler.net/benchmarks
>
> Yes, performance is worse under Linux - probably around half the speed you
> get under .NET on Windows. Does that mean it's going to be slower under
> Mono than the Zend VM? I would say not likely. But I guess we'll have to
> wait for a Linux PHP vs Linux Phalanger benchmark to know for sure...
>
> - Rasmus
>
>
> On Thu, Dec 8, 2011 at 7:16 PM, Rasmus Lerdorf <ras...@lerdorf.com> wrote:
>
>> On 12/08/2011 03:53 PM, Rasmus Lerdorf wrote:
>> > This is a complete non-starter. The bulk of PHP users are on
>> > non-Windows, especially Linux, and Mono performance on Linux is really
>> > not good. Last time I checked it was an order of magnitude slower on
>> > Linux compared to the same hardware running Windows. Granted that was
>> > quite a few years ago now and I assume it is no longer 10x slower.
>> > Perhaps it is up to 4x or even 2x slower.
>>
>> Here are some more recent numbers to back that up:
>>
>> http://www.codeproject.com/KB/dotnet/RuntimePerformance.aspx
>>
>> Basically what you are suggesting is that we replace the Green bar there
>> with the Grey one. Note that lower is better. This does show that Mono
>> performance is starting to approach .Net performance, at least for this
>> benchmark, but it still isn't there. And if you look through the various
>> benchmarks you will see that native C/C++ code is 5-10x faster than the
>> same code running under Mono.
>>
>> -Rasmus
>>
>>



-- 
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to