3 ms·
Why are you so concerned about speed? Do you know right now that you'll have difficulty meeting a performance target on reasonable hardware? Depending on what
by MichaelSalib 16y ago
Why are you so concerned about speed? Do you know right now that you'll have difficulty meeting a performance target on reasonable hardware?
Depending on what you're doing, Python may very well be faster than Java. I've done a lot of work with NumPy and found it to be both faster and safer than third rate roll your own numeric libraries that so Java programmers like to write. I've also had good success with Pyrex/Cython.
Assuming that run time performance won't be the determinative factor, your decision will probably come down to libraries and aesthetics more than anything else. I'd go with Python since I think it would allow you to iterate faster, but that's a very subjective decision.
- apurva 16y agoSecond Michael's opinion... Some really good python libraries out there besides NumPy and SciPy. Pandas comes to mind http://code.google.com/p/pandas/ http://code.google.com/p/pandas/ Pretty good for data analysis. Besides this, I think there was a talk on Python for the Finance world in this year's PyCon, possibly worth a look too...
- CyberFonic 16y agoAs I see it the difference is that Python is a scripting language which can be used to corral functions in shared libraries. Java is a programming language with a edit-compile-debug loop. You should get things working faster in Python but get a bit more speed with Java - eventually. I have chosen Python for a similar large, complex, evolving application - in constant use whilst under development. The key is the speed with which I can write working, tested code. With an earlier (different) project using Java, I found the APIs and debugging being a huge drag on productivity. Surprisingly I have found performance mostly acceptable. A small number of bottlenecks were addressed by rewriting specific modules as services in C and calling them. As it is said: "Premature optimisation is the root of all cumbersome system designs". Get the data structures right first, then implement clean algorithms. Only when you can prove that there is a bottleneck and you can't speed it up sufficiently by throwing more hardware at it, only then do you rewrite as little as possible in C/C++.