Still needs quite a bit of cleanup, but:
https://github.com/bergie/Silex/tree/master/example/AiP
--
Henri Bergius
Motorcycle Adventures and Free Software
http://bergie.iki.fi/
Skype: henribergius
Jabber: henri....@gmail.com
Microblogs: @bergie
> Hi,
>
> Still needs quite a bit of cleanup, but:
>
> https://github.com/bergie/Silex/tree/master/example/AiP
Cool! Did you show it to Fabien?
Not yet, but discussing it on symfony-dev
BTW, this is now on Hacker News: http://news.ycombinator.com/item?id=2543914
Interesting point is that AiP + Silex (at least in this trivial
example) is faster and uses less memory than Node.js
AiP:
13958 bergie 20 0 125m 10m 2136 S 1 0.6 0:00.28 php
13959 bergie 20 0 125m 10m 2136 S 1 0.6 0:00.31 php
3.80 transactions per second
Node.js
14051 bergie 20 0 615m 12m 4988 S 0 0.7 0:00.34 node
3.79 transactions per second
--
Henri Bergius
Motorcycle Adventures and Free Software
http://bergie.iki.fi/
Jabber: henri....@gmail.com
Microblogs: @bergie
> Sorry, but benchmarking hello world really is pointless.
not totally pointless, but of course shouldnt be used as more as an indication of a real application. but it does tell you a ballpark figure and as such the results are quite promising.
regards,
Lukas Kahwe Smith
m...@pooteeweet.org
Yep. I think the differences of the PHP and async Node.js approaches
will show more when you add some I/O and templating to the mix.
> Lukas Kahwe Smith
/Henri
Doesn't node uses the V8 JS engine, which is a JIT-ing son of a .. plus
JS is a bit more high-level than PHP, that could explain the memory
differences. But the best would be to take a look at /proc/[pid]/maps .
And I'm more suprised that there isn't any significant difference in speed.
--
Pas
On Fri, May 13, 2011 at 7:14 PM, Pas <past...@gmail.com> wrote:
> And I'm more suprised that there isn't any significant difference in speed.
On my blog somebody commented about running Node.js in production mode
for the benchmark. While this didn't affect memory usage, it made Node
a bit faster than AiP (4.24 t/s vs. 4.06 t/s). I wonder if bytecode
cache or similar optimizations would do more boost for the PHP
implementation.
> Pas
/Henri
Hi,
On Fri, May 13, 2011 at 7:14 PM, Pas <past...@gmail.com> wrote:And I'm more suprised that there isn't any significant difference in speed.
On my blog somebody commented about running Node.js in production mode
for the benchmark. While this didn't affect memory usage, it made Node
a bit faster than AiP (4.24 t/s vs. 4.06 t/s). I wonder if bytecode
cache or similar optimizations would do more boost for the PHP
implementation.
>
> On May 13, 2011, at 9:30 PM, Henri Bergius wrote:
>
>> Hi,
>>
>> On Fri, May 13, 2011 at 7:14 PM, Pas <past...@gmail.com> wrote:
>>> And I'm more suprised that there isn't any significant difference in speed.
>>
>> On my blog somebody commented about running Node.js in production mode
>> for the benchmark. While this didn't affect memory usage, it made Node
>> a bit faster than AiP (4.24 t/s vs. 4.06 t/s). I wonder if bytecode
>> cache or similar optimizations would do more boost for the PHP
>> implementation.
>
> it shouldn't. bytecode cache doesn't make sense for constantly-running application.
> on the other hand, APC had some support for optimization plugins. using one of those can make execution faster.
> see http://pecl.php.net/package/optimizer
yeah unfortunately this extension has been lingering. i have seen ilia ponder getting on it a few times on IRC.
anyway, is AiP compatible with the zend optimizer?
http://static.zend.com/topics/Zend-Optimizer-User-Guide-v330-new.pdf
then again it seems like the product is not available anymore or maybe its bundled inside their server offerings?
anyway, is AiP compatible with the zend optimizer?
http://static.zend.com/topics/Zend-Optimizer-User-Guide-v330-new.pdf
then again it seems like the product is not available anymore or maybe its bundled inside their server offerings?