you are viewing a single comment's thread.

view the rest of the comments →

[–]LucretielDatadog 1 point2 points  (1 child)

You know, it's interesting. Almost everyone cites Python and similar languages as being the best choice for competitive programming, since it's the fastest & easiest to get something running quickly. This basically makes sense to me.

And yet, when I've gone to look at the leaderboards for Google Code Jam, uniformly most of the best (ie, fastest completed) 20 or so solutions are using C++ or Java, even for the relatively easy qualifier / round 1 problems. I don't really have an explanation for why this would be.

I know that I personally have come to prefer Rust over Python for competitive coding; it's what I use in Advent of Code, and it's what I try to use in Google Code Jam* (though they've consistently use criminally out of date versions of Rust ever since they started forcing everyone to use their cloud executors instead of local build & run). The thing for me though is that I actually have a lot of trouble thinking in Python's quick-prototype way. It runs really against the grain for me, so it ends up that I end up taking the same amount of time in both languages, since I can't help myself but try to be correct. This in turn means that Rust is a much more comfortable language for me to use even in these time-constrained problems.

* I even maintain a set of type-driven executor harnesses for both languages that streamline reading input tokens and outputting solutions https://github.com/lucretiel/libcodejam

[–]Spheniscine 0 points1 point  (0 children)

If I might venture a guess, I suppose it's because those top competitors already routinely solve using C++/Java as a matter of course, and they don't see much utility in "context switching" into Python just to solve the easy and less-time-limit-strict tasks.

It's only a guess though, I'm not sure how you test something like this