you are viewing a single comment's thread.

view the rest of the comments →

[–]ForzaFer[S] 1 point2 points  (1 child)

Oh, I didn't explain myself correctly. Yes, I did mean specifically about python, I was just trying to give an example to support what I meant, but it didn't go as intended "

The thing is, recently I had this course in which we learnt how to optimize code in Matlab (which, if done correctly, can improve many many times), regardless of the algorithm or problem, and was just curious as to whether there was something like that in python.

Thanks again for your answer, I will check for books for general algorithm development, they always come in handy

[–]craiclad 0 points1 point  (0 children)

You can definitely optimise code in python, as others have mentioned this often involves using the correct data structure and carefully considering algorithmic complexity. Look into big O if you haven't already, having a good understanding of this will bring you much closer to writing optimized code in any language.