why python is slower than java?

Alex Martelli aleaxit at yahoo.com
Sun Nov 7 06:24:21 EST 2004


On 2004 Nov 07, at 11:37, Maurice LING wrote:

> Mainly to Alex and the rest of the adjitated community,
>
> [snip about Melbourne club scene]
>
> I do understand what you meant. There are restrictions in giving out 
> data (codes) in many cases and I seek your understanding.

Sure, if you need help understanding or fixing the behavior of 
proprietary codes, that's harder.  Nevertheless, although not a 
work-free process, it IS often productive to try and extract a small 
core of code that reproduces a performance problem.  If you can't 
reproduce the problem on a small scale (small in terms of lines of 
code, not in quantity of data), that's significant too.  Best is when 
you _can_ reproduce it, because then you do have code you can post and 
get free expert help about!

> Nevertheless, I do feel that you had unfairly made use of this case to 
> voice out your accumulated dissatisfaction with answering newbies 
> questions.

I disagree: somebody else commented on newbie-friendliness of this 
group, and my discussion was in response to their comments.

> In later parts of this thread (after your post), it was suggested that 
> my errorous impressions might have been formed by books and 
> publications (such as "learning python", as suggested)...... I do not 
> seek to place blame on anyone for my misconceptions. But considering a 
> person trying to learn a new programming language, it is common that 
> the person takes in what is presented in the face, especially from 
> books such as, "Learning python" and "Python, the complete reference".

I have not seen "learning python" mentioned in this thread -- funny, 
because I did read all posts; having been a tech reviewer for (2nd 
edition) Learning Python, I'd have been quite interested (if nothing 
else, to check if the guilty passage WAS one I had remarked on, and my 
remarks had not been taken into account by the authors, or something 
that had escaped me).  I'll googlegroup in a few days when the archive 
has had a chance to update.

>> Does this imply you now believe that the unquestioned-assumptions 
>> behind
>> your "why" questions were unfounded?
> Now I will say that Python is comparable to Java in terms of disk I/O.

This makes sense to me.  Java apparently has more traps and pitfalls, 
but once you're expert enough to bypass them, if program 
startup/shutdown is no problem (long-running program), both Java and 
Python should be able to saturate the disk bandwidth capacity, 
normally.


> All in all, through all these discussions, I can safely assert that 
> Python and Java are comparable in disk I/O. And a part of the original 
> misconceptions might have been formed possibly out-dated printed 
> materials which are still references for new python programmers. It is 
> then my concern that such misconceptions may be perpentuated.

I share your concerns in this regard.  Which is why I'll be quite 
interested to check "Learning Python" once I do get the specific 
reference on google groups.  I'm not sure what that "complete 
reference" book _IS_ -- there is probably nothing we can do about that 
one.  But good publishers CARE, and O'Reilly IS a good publisher, so, 
if Learning Python has some serious error, we can surely get it fixed 
next printing!!!

> I admit and apologise for my poor phrasing of questions which sparked 
> this chain of events. We had all lost some cool along the way and some 
> harsh words flew. Alex, I do hope you will accept my apologies. I 
> suppose I am pissed off when the flare is targetted towards myself and 
> not the situation. Anyway, my apologies...

Thanks!, and my apologies in return if the way I responded to other 
people's comments about generic newbie-friendliness were poorly worded 
and made you feel unfairly targeted for other people's mistakes.  That 
was not my intention, please be sure of that.

I _am_ interested in pursuing the issues of possible errors in Python 
books, AND I/O performance issues in Python vs Java, btw, if anybody 
wants to.  The fact that _in theory_ there shouldn't be any such 
issues, doesn't mean that some couldn't be found _in practice_ where we 
(or JVM coders;-) goofed or took justifiable but unfortunate design 
decisions...;-).


Alex




More information about the Python-list mailing list