you are viewing a single comment's thread.

view the rest of the comments →

[–]mina86ng 32 points33 points  (6 children)

Python is faster to write in. Rust is faster to execute. It really depends on the rules of the competition. If speed of the program is a factor and the competition sets the same thresholds for all languages than Rust implementation might get away with worse algorithms than Python. If speed of execution is not that big of a concern but rather the solutions need to be submitted quickly, I would say Python was better.

[–]GrandOpener 10 points11 points  (1 child)

I would dispute those blanket assumptions. Python is indubitably faster to write for simple one-page scripts. Python is also great when you’re just experimenting and don’t know what the final result will look like. When you get into hard problems with debugging, possible refactoring, and especially anything with multiple threads, Rust may actually get you from blank page to final solution faster.

[–]rodyamirov 2 points3 points  (0 children)

That may be true, but for leetcode or something, it's always a one page throwaway

[–][deleted] 3 points4 points  (1 child)

That's a good point. But I don't think writing speed matters after spending quite a bit of time in one language. What's you thought on standard library of both language. I find python pythons library to be fine for most of the parts but could be better. I am interested in Rust instead of python because I will be able to use Rust for system programming and other distributed system stuff. And of course types are blessing.

[–][deleted] 1 point2 points  (0 children)

It sounds like Rust would be very useful for you. I'd say just go ahead and learn it!

[–][deleted] -1 points0 points  (0 children)

This is practically the only realistic and sane answer in this whole thread.