4 ms·
Speed isn't an issue, at least in my experience, compared to similar languages. Raw PHP usually beats Rails handsdown, and most PHP frameworks are usually compa
by RobAley 14y ago
Speed isn't an issue, at least in my experience, compared to similar languages. Raw PHP usually beats Rails handsdown, and most PHP frameworks are usually comparable. PHP performance has increased markedly over the past few years, and particularly in v5.4. And if you really need a speed bump you can use the APC cache or HipHop compiler. Its never going to be as snappy as, say, C, but in the class of languages its in these days it holds it head up high.
I like the namespace separator, but I'll accept I’m in the minority on that one.
- wvenable 14y agoI really hated the namespace separator and I ranted against it pretty heavily before PHP 5.3 was released. But I've been using PHP 5.3 pretty heavily for a new project and now I don't mind the backslash at all. I also understand the technical need for a new character (which doesn't exist for static languages or some other dynamic languages) and once you need a new character then the backslash is a reasonable choice.
- papsosouid 14y ago>Raw PHP usually beats Rails handsdown, and most PHP frameworks are usually comparable Being able to keep up with the slowest competitor in existence isn't very good.
- RobAley 14y agoThe reason I cited Rails is that its usually proposed as the better alternative in these anti-PHP threads. Most "high" performance PHP doesn't use one of the usual-suspects in the framework world and can easily beat Rails (and usually plain ruby too). Edit: I should add "in my experience" to the end of that, I have no stats to hand.
- papsosouid 14y ago>Most "high" performance PHP doesn't use one of the usual-suspects in the framework world and can easily beat Rails (and usually plain ruby too). If you skip a framework on both languages, they end up as the two slowest languages. Hard to say if either is faster overall, but they are both awful. Using jruby provides a huge performance increase, and PHP really has nothing to compare with that.
- RobAley 14y agoTo be honest I've not used jruby. It would be interesting to see how it compares to implementations PHP on the JVM such as IBM's WebSphere sMash, and Caucho's Quercus. Do you have any views on the performance of jruby vs hiphop'd PHP?
- papsosouid 14y agoHiphop doesn't really compete in the same space, as it only converts a subset of PHP into C++, and has very limited support for various PHP modules. I don't think any of the common PHP apps like wordpress, joomla, etc work under hiphop. Stuff like Quercus is the jruby of PHP, being an actual implementation of PHP rather than a source -> source translator. But I haven't seen any benchmarks showing it actually beating regular PHP. It does have a much better security record than the official PHP though, and is probably a worthwhile project on that grounds alone.
- Produce 14y agoI've had to implement a feature in C (it was a batch process analysing some data and spitting out ~250k rows) because it was incredibly slow in PHP. As others have said, Ruby sucks for speed too.