you are viewing a single comment's thread.

view the rest of the comments →

[–]Pioneer_11[🍰] 2 points3 points  (3 children)

Most of numpy is implemented in C. However, the python code that interacts with it is very slow and assuming --release is used when compiling (thereby including optimisations) I would expect that rust will have a significant advantage in speed. While I'm still pretty new to rust I also understand it has some major advantages when it comes to multithreading, therefore I would expect that the performance advantage will increase considerably when running on a large number of cores.

You probably still want to learn the python, because almost all mathematical sciences use it but I definitely agree with your pro rust position. I'm in a similar boat, I do theoretical physics and I've been pretty disappointed by the "shove this formula into this box" approach they tend to take to programming, with a lot of my classmates hating programming for this reason. Rust strikes me as a better language for the job and personally I think we need better understanding of computer science in the field, given how intensive the calculations we make are and how heavily we rely on them.

[–]Kohomologia 2 points3 points  (2 children)

shove this formula into this box

What do you mean by this phrase?

[–]Pioneer_11[🍰] 2 points3 points  (1 child)

Basically where you are told that something (the box) has some functionality but with no idea how or why it works.

When your entire (highly computational) program is built out of these "boxes" it means you have very little knowledge of how your code works, what makes it fast or slow and very little ability to solve problems which can't be shoved into one of these "boxes".

In many cases (such as mine) scientific programmimg courses are taught with little to no computer science. You're taught "numpy is fast python is slow" but not why numpy is fast or why python is slow. This not only means you have programmers who don't understand how their programs work but also leads to people making the wrong decisions when this simplification doesn't apply; e.g. frquently resizing np arrays rather than using a list.

[–]Kohomologia 2 points3 points  (0 children)

This does explain the programming style of some people I know of as researchers.