Which of the three is generally faster? I know there are some specific cases where one performs much better than it does elsewhere but I am speaking of the common situation.
Name:
Anonymous2010-06-14 8:45
Neither, you ought to try Jython on Rails.Net instead
Languages are not implementations. Languages may be prone to be slow or fast when implemented, but they don't have such properties - implementations do.
Sun's Java JVM implementation is likely faster than Python's or PHP's default ones. Java compiles to bytecode which the JVM JIT's.
Python is interpreted by default, altough most third-party implementations outperform guido's by being... compilers!
It has the potential to be faster, check out the third party ones (unladen-swallow, cl-python, ...).
PHP is badly designed and has an interpreted implementation. It's probably the slowest. There is the Zend accelerator(and many third party bytecode caching plugins) which allows executing bytecode directly, but it's still SLOW. Bad language design and stupid programmers sometimes leads to people eval'ing and not caching the bytecode anyway, which defaults you to PHP's slow self.
In general, languages which only have interpreters tend to be toy languages or badly designed, or both. I'm surprised PHP and Python are so popular.
Why are you asking? I hope you're not that web design guy that made that other silly thread! If you were, I wouldn't recommend either language for what you want to do, but any of them would work. Python probably has better frameworks. Keep in mind that even if Python and PHP are slow, most web applications' speed usually hardly matters - people are willing to put up with a bit of latency. If I really wanted speed in a web framework, I'd go with one of those great Common Lisp web frameworks, and an implementation like SBCL which compiles to native code, or if that wasn't high-performance enough, I'd just write it in C.
>>3
My apologies for my sheer newfaggotry. You caught me - I'm the same guy. I am only beginning to learn programming on a level beyond the idiocy that was required of me back in highschool and as such ask a lot of questions that must seem really stupid to those in the know.
If you can write something to be faster with some more effort, I do not see a reason why not do so. 'Either do something well or don't do it at all' lingers in my mind.
As I've written in the other thread I need a language that is commonly supported by hosts as sometimes the customer may already have paid/picked the host and domain, hence why I cannot use C or the like.