Re:When being idiomatic wears you out
by owenmarshall on Saturday August 27, 2011 @09:36AM
(#2931429)
>That being said, python is a language to write something up quick, prototype an idea, put up a simple webserver. However, when your program must scale or if you're trying to optimise for speed, you should highly consider java. The code will be more verbose, but you will pick up a tremendous speed increase.
If your Python application is slow, you can throw hardware at it. That's easy & cheap.
If your Java application development cycle is slow, good luck -- you cannot just throw programmers at the problem.
It's almost always better to have fast programmers than a fast application.
> It's almost always better to have fast programmers than a fast application.
So I guess algorithms just don't matter.
Re:When being idiomatic wears you out
by owenmarshall on Monday August 29, 2011 @01:51PM
(#2938079)
Selecting a language that lets you develop quickly over a "fast language" is orthogonal to selecting algorithms.
Is there a reason you believe them to be related? Or, did you repost one line of my comment without any context and expect to make a salient point?
I'm not sure I understand how choice of programming language affects choice of algorithm.
Re:When being idiomatic wears you out
by SoftwareMaven on Saturday August 27, 2011 @11:10AM
(#2931632)
There are a LOT of variables in that performance equation. A lot of numerical analysis happens in Python, where speed is critical (see NumPy and SciPy). Web-based applications have so many potential bottlenecks that python rarely starts as the bottleneck and there are ways around many of them (multiple processes, etc).
The problem I have with Java (and this comes with 10 years of writing appps in Java) is that it so slow. By slow, I mean slow to get anything implemented. Everything takes a long time to build. Depending on your company, that can be the biggest performance problem of them all!
Sure, using python abstracts away a lot of things (e.g. memory management, type settings, etc.), and some might argue you have less freedom in python, but in the end, python is much closer to "logic" than java. Each line contributes to the logical flow of the program.
That being said, python is a language to write something up quick, prototype an idea, put up a simple webserver. However, when your program must scale or if you're trying to optimise for speed, you should highly consider java. The code will be more verbose, but you will pick up a tremendous speed increase.
I'm sure those of you who are hard-core Java programmers will disagree in some sense, so please leave your thoughts.