BT

Improve PHP Performance with Phalanger for .NET and Mono

by Jonathan Allen on Aug 02, 2011 |

Phalanger is a PHP compiler for the .NET and Mono runtime. It is currently capable of running popular PHP based applications such as WordPress. With the exception of indirect invocation of static methods, Phalanger now offers across the board performance improvements over PHP 5.3.1.

As you can see in the below chart, there are been significant between June’s build and yesterday’s release. Much of these improvements are directly attributable to the incorporation of the Dynamic Language Runtime (DLR).

Miloslav Beňo writes,

Before DLR, we were classifying operations into two cases (not counting eval), bound during compilation and bound during run time. The goal for Phalanger as dynamic language compiler is to compile as much as possible as compile-time bound operations and use runtime-bound operations only for cases that can’t be determined during compilation. DLR caching system allows compiling operation at run time when we know particular types for the operation and store compiled operation into cache. This can work efficiently because of the idea that when particular operation occurs, there is a big chance that the next time operands will have the same type.

Phalanger 2.1 is available on CodePlex under the Apache open source license. For a walkthrough that shows how to set it up see Miloslav’s article titled WordPress on .NET 4.0.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT