Python is slow

B

Bruno Desthuilliers

Carl Banks a écrit :
(snip technically pedantic correction)
You know, even though you're technically correct, I'd like to see you
abandon this little crusade. At this point it's more noisy than
helpful.
(snip)

Mmm... You're probably right. I tend to be way too pedantic sometimes.
OTHO, there are people not even having the slightest clue here - I once
was - and being corrected on similar things usually helped me. But yes,
I'll try to refrain myself...
 
A

Andrii V. Mishkovskyi

2008/5/22 cm_gui said:
Python is slow. Almost all of the web applications written in
Python are slow. Zope/Plone is slow, sloow, so very slooow. Even
Google Apps is not faster. Neither is Youtube.
Facebook and Wikipedia (Mediawiki), written in PHP, are so much faster
than Python.
Okay, they probably use caching or some code compilation -- but Google
Apps and those Zope sites probably also use caching.

I've yet to see a web application written in Python which is really
fast.

Troll harder.
 
M

Méta-MCI \(MVP\)

Bonsoir !

Perso, je pense que des précisions comme celles de Bruno sont très
utiles, car elles évitent les dérives, et l'apparition de langages
bâtards, et impurs (pythonesquement parlant).

Non aux Pythons OGM !!!

Toutefois, iles est dommage que je comprenne pas l'anglais, et donc pas
vraiment son message/discours...

@+

Michel Claveau
 
I

inhahe

Paul Rubin said:
There are native Python compilers, see psyco and pypy.

That does complicate the question since there are 4 levels of executing code

interpreted
bytecode-compiled-interpreted
jit-complied
natively compiled

i've tried psyco a few times and never noticed much of a speed increase. if
any.
and then on the other hand, .net is supposed to be almost as fast as C
because of its JIT. but the whole issue of the speed of .net seems to be
enshrouded in mystery, so who knows.
 
B

bruno.desthuilliers

That's like saying being spherical is not a property of planets, it's a
property of an instanciation of a planet.

I do definitively not have the required knowledge to say anything
about "being spherical" being part of the definition of what a
"planet" is or not.
, and b) It's a far cry to
imagine a planet coming into being that's not spherical
Idem

(a language as
dynamic as Python, or most other scripting languages, would be either
extremely difficult or impossible to make a native compiler for).

Now this I can tell is false. The problem is not that it's difficult
to "make a native compiler for" dynamic languages, the problem is that
it's difficult to write native compiler for dynamic languages that
generates code that beats the VM/byte-code interpreter/whatever you
name it to be wotrh the effort.
I guess I
should also mention that Python isn't very practical (as in "suitable",
"right tool for the job", and "perfomance", as mentioned in the above post)
without an implementation.

That is debatable. There are algorithm courses taught in "pseudo-code"
- that is, a language that doesn't have any known implementation.
So I don't think this distinction has any use
other than to beat other people over the head with a bat.

Ok, *you* know this - I mean, the distinction between a language and a
language's implementation(s). Are you sure everyone saying - or
reading - assertions such as "language XXX is slow" or "compiled
languages are faster" etc really know what they're talking about ?
Which is then interpreted, but you're still technically right, because
"compiled" can mean either compiled to bytecode or compiled to native code,
despite what it actually did mean. Semantics FTW!!

Yes, semantics. But a bit more than semantics - byte-code interpreters
are usually way faster than "pure" interpreter, and start to be fast
enough for quite a lot of practical use.

Ok, I'll stop on this - once again, sorry for the noise, and please
bear with me, I tend to be a bit too much on the pedantic side
sometimes. But still, thanks to the pedantics peoples on usenet that
taught me so much so far and still teach me more and more...
 
C

cm_gui

i am not comparing Python with C or C++ which are of course
compiled languages.

if there is any consolation to Python lovers here, Python is still
faster than Microsoft ASP/ASPX.

i'm not trying to 'troll' here. it's not just me.
many have complained that python is slow. python websites are slow.

if python is such a good programming/scripting language,
why can't they build a faster interpreter/compiler engine?
and beat php and zend.
to the python team, rebuild your interpreter!


torontolife.com is slow.

okay, maybe Python is only slightly slower than PHP,
but it APPEARS to be much slower.
there is a distinct waiting time whenever you access a python web page
before the page starts loading. but once it loads, it is fast.
php page starts loading immediately once you access it,
but you can see the page slowly loading.
because you see the page starts loading immediately, you feel it is
fast.
 
J

Jeremy Pager

It's wrong. Here's why.

Compare your statement to:
"OP: Humans are weak.
"Brad: They ain't gorillas, but they ain't insects either...
somewhere in between."

Python is *not* in between C++ and something else. It's far ahead
of them all. Raw speed is not the most important thing in programming
languages like raw physical strength is not the most important thing
in life.
Pure Python has less raw speed than most compiled-to-machine-code
languages, but it doesn't matter. Python can be extended easily and,
most important, Python is smart.

Ivan


Except this conversation is not about whether Python is smart. It's about
whether Python is fast, so yes, in the context of this conversation, it
does matter.
 
P

Paolo Victor

I love it when a troll tries to make his/hers/its point with a vague,
biased assumption:

"I mean, it's not that slow - wait, I guess it's slower, because I...
I think so! Yeah! It's slow! At least it feels like it..."

It's all about choosing the right tool. If you think Python doesn't
suit your needs, you really should look for something that does,
instead of wasting your (and our) time with "guesses" and "feelings".

Research/develop/execute a benchmark. Gather and analyze relevant
data. Make a real contribution.

Peace,
Paolo

Hallöchen!

cm_gui said:
if python is such a good programming/scripting language,
why can't they build a faster interpreter/compiler engine?
and beat php and zend.
to the python team, rebuild your interpreter!
torontolife.com is slow.

For me, torontolife.com is exactly as fast as Wikipedia.

Tschö,
Torsten.
 
C

Carl Banks

i'm not trying to 'troll' here.

Maybe you're not trying, but you're succeeding.

If you want to criticize be constructive about it, otherwise get out.


Carl Banks
 
I

Ivan Illarionov

i am not comparing Python with C or C++ which are of course compiled
languages.

if there is any consolation to Python lovers here, Python is still
faster than Microsoft ASP/ASPX.

i'm not trying to 'troll' here. it's not just me. many have complained
that python is slow. python websites are slow.

if python is such a good programming/scripting language, why can't they
build a faster interpreter/compiler engine? and beat php and zend.
to the python team, rebuild your interpreter!


torontolife.com is slow.

okay, maybe Python is only slightly slower than PHP, but it APPEARS to
be much slower.
there is a distinct waiting time whenever you access a python web page
before the page starts loading. but once it loads, it is fast. php page
starts loading immediately once you access it, but you can see the page
slowly loading. because you see the page starts loading immediately, you
feel it is fast.


It's only your feelings based on prejudice.

Please look at the real benchmarks:

http://www.alrond.com/en/2007/jan/25/performance-test-of-6-leading-
frameworks/

PHP is the slowest.
Python/Django is the fastest. 2x-35x times faster then PHP.

Give us the real benchmarks or stop trolling.

Ivan
 
E

Eric Wertman

if python is such a good programming/scripting language, why can't they
build a faster interpreter/compiler engine? and beat php and zend.
to the python team, rebuild your interpreter!

while this is just a boring troll.. it does bring me to a more
interesting point... it would be cool if the interpreter were
multi-threaded to make better use of smp systems. While you can do
threading, if you really want to drive more than one cpu some forking
is in order.
 
L

Lie

Brad a écrit :



LordHaveMercy(tm). Could you guys please learn what you're talking about?

1/ being interpreted or compiled (for whatever definition of these
terms) is not a property of a language, but a property of an
implementation of a language.
2/ actually, all known Python implementations compile to byte-code.

<flamingmode useofbrain="alotforaflame">
LordHaveMercy(violatingsomeonesTM). Couldn't you understand that a CPU
INTERPRET bytes of instruction, and that means ALL languages is
interpreted in one stages or another, some languages' (implementation)
is translated/compiled into an intermediate language/bytecode like
most Python or C/C++ or Java implementations, some language
implementation interprets the language directly (like Javascript).

The difference between C and Python (in their regular implementation)
is WHO interprets it, most C/C++'s implementation is interpreted
directly by the CPU, all Python's implementation is interpreted by a
VM. Saying a language implementation is interpreted is nonsense as all
languages implementation is interpreted either by a VM or by CPU or an
interpretator, but we do have a semantic agreement that calling a
language interpreted means it is NOT interpreted by the CPU directly,
some minority have their own agreement that a language
(implementation) is interpreted when it is never translated into an
intermediate language/bytecode, you fall into this second group, which
actually uses the wrong terminology but do have some followers. Don't
forget that language is all about what the _consensus_ says, not what
the dictionary says.

Brad doesn't use any terms incorrectly, he stated that Python is
interpreted, which is true, since in all python implementation,
Python's bytecode is interpreted by a VM. He also states that C/C++ is
compiled which is also true as most if not all C++ implementation have
a stage where it is translated into an intermediate language/bytecode.
</flamingmode>
 
J

John Salerno

okay, maybe Python is only slightly slower than PHP,
but it APPEARS to be much slower.
there is a distinct waiting time whenever you access a python web page
before the page starts loading. but once it loads, it is fast.
php page starts loading immediately once you access it,
but you can see the page slowly loading.
because you see the page starts loading immediately, you feel it is
fast.

::crickets::
 
J

Jan Claeys

Op Fri, 23 May 2008 14:00:33 -0700, schreef (e-mail address removed):
Now this I can tell is false. The problem is not that it's difficult to
"make a native compiler for" dynamic languages, the problem is that it's
difficult to write native compiler for dynamic languages that generates
code that beats the VM/byte-code interpreter/whatever you name it to be
wotrh the effort.

Well, it would be much easier if there would be hardware that was
designed for object oriented & dynamic programming... ;-)

(Most current hardware is designed for use with C & similar languages, or
sometimes for massively parrallel computing (e.g. GPUs), but the last
tries to design hardware to fit something like Python date back to the
1980s AFAIK...)
 
S

Sean Allen

okay, maybe Python is only slightly slower than PHP,
but it APPEARS to be much slower.
there is a distinct waiting time whenever you access a python web page
before the page starts loading. but once it loads, it is fast.
php page starts loading immediately once you access it,
but you can see the page slowly loading.
because you see the page starts loading immediately, you feel it is
fast.

that is a product your html. in fact, there are entire books written
about it.

for example, if i put a external script in the head of the page that
is a large
script, rendering of the entire page will pause.

if that script isnt needed to display the intial page, by moving the
script
tag to the end of the body of the page, rendering will proceed quicker
in
terms of time to display to user although overall speed will be the
same.
 
M

Mark Tarver

Python is slow.    Almost all of the web applications written in
Python are slow.   Zope/Plone is slow, sloow, so very slooow.  Even
Google Apps is not faster.   Neither is Youtube.
Facebook and Wikipedia (Mediawiki), written in PHP, are so much faster
than Python.
Okay, they probably use caching or some code compilation -- but Google
Apps and those Zope sites probably also use caching.

I've yet to see a web application written in Python which is really
fast.

You might like to look at Norvig's analysis which supports your view
about Python being slow.

http://norvig.com/python-lisp.html

Mark
 
B

Baris-C

Python is slow.    Almost all of the web applications written in
Python are slow.   Zope/Plone is slow, sloow, so very slooow.  Even
Google Apps is not faster.   Neither is Youtube.
Facebook and Wikipedia (Mediawiki), written in PHP, are so much faster
than Python.
Okay, they probably use caching or some code compilation -- but Google
Apps and those Zope sites probably also use caching.

I've yet to see a web application written in Python which is really
fast.

I do not have much experience on python but, php is %25 more faster
than python in a simple iteration.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top