4 ms·
While Ruby is a fantastic language and a joy to program in, if you are planning on heavy computation, python is a much better route to go. While everything can
by phamilton 15y ago
While Ruby is a fantastic language and a joy to program in, if you are planning on heavy computation, python is a much better route to go. While everything can be tweaked and optimized in both languages, python is generally favored for performance and ruby for flexibility. Numpy and Scipy are both quite efficient and provide lots of functionality needed in scientific computation. Down the road, if you have a script that takes days, weeks, or even months to complete, python allows you to refactor the bottlenecks in your code into C without too much difficulty.
I spent a year working in high performance computing at a university and so much ugly and inefficient code was written in matlab. Had they written it in python, it would have been much easier to optimize and their research would have been much more productive.
- troels 15y agoI don't think the raw computing power is that important in this case. And if it was, there are better alternatives than Python. However, I would suggest that Python is probably a better beginner/learning language than Ruby. There are many odd ends in the Ruby language that might easily trip an inexperienced coder up.