JasonMendoza2008's blog

By JasonMendoza2008, history, 8 months ago, In English

The general consensus is that competitive programming is competitive so if you're going to choose a slower language (like Java or especially Python) you need to be ready to deal with the potential setbacks and advantages of your chosen language. It's fair to say that Codeforces isn't supposed to accommodate your language choice by increasing the time limits according to the language especially if it's a poor one that is known to be slower than something like C++. HOWEVER, Python version on codeforces is currently 3.8 (out for 4 years) and versions 3.11 and 3.12 both bring speed improvements (3.11 for a lot of stuff (https://docs.python.org/3/whatsnew/3.11.html#:~:text=Python%203.11%20is%20between%2010,See%20Faster%20CPython%20for%20details.) and 3.12 for comprehensions (https://docs.python.org/3/whatsnew/3.12.html#:~:text=This%20speeds%20up%20execution%20of%20a%20comprehension%20by%20up%20to%20two%20times.)). I know loads of people use PyPy (and it does seem to work very well, cf. https://i.imgur.com/v9iOJnw.png) but it would seem relevant to allow newer versions of Python (**I would even argue it will help lower the CPU demand on codeforces servers since both versions are known to be faster** so realistically ... why not ...).

I've just started codeforces so maybe this has been discussed before but I haven't seen any topics talking about it and i honestly don't think there'd be any drawbacks in getting a newer, faster version of Python on the website.

  • Vote: I like it
  • +19
  • Vote: I do not like it

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by JasonMendoza2008 (previous revision, new revision, compare).

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by JasonMendoza2008 (previous revision, new revision, compare).

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

nice idea

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by JasonMendoza2008 (previous revision, new revision, compare).

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

At the moment, the language must be compatible with Windows 7 to work on Codeforces.

Also, version 3.10 is the latest secure version https://www.python.org/downloads/, so there is no way we use 3.11/3.12 now.

  • »
    »
    8 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    To be fair, 3.9 and 3.10 supposedly improve performance a bit too (although I'm not too sure it's comparable to 3.11). The compatible with Windows 7 requirement is something I didn't know about, so I guess it's not possible :(

  • »
    »
    8 months ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    Keeping both the CPython version and the PyPy version up to date would still be appricated, even if it is just 3.10 support. One nice feature that got added in 3.10 is the support for .bit_count(), corresponding to C++ popcount. There is a suprising number of algorithms where this is useful.

  • »
    »
    8 months ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    Latest "secure" version doesn't really mean anything for Python releases being usable or not. The "security" tag, according to the documentation, means that only security fixes are accepted further. The "bugfix" tag corresponds to stable releases, where only bugfixes and security fixes are accepted (for getting into a newer "sub"-release). So using the latest security-tagged version only matters if the version is to be never updated again on Codeforces, in case any bug is fixed. However, if you care about security, you should always keep updating the compilers/interpreters to the latest versions as frequently as possible.

  • »
    »
    8 months ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Actually checking https://www.python.org/downloads/windows/ , the latest version that supports windows 7 is 3.8.18. Seems CPython has completely dropped support for windows 7.

  • »
    »
    6 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    3.10 is the latest secure version

    What do you mean? Sounds like nonsense.

»
8 months ago, # |
  Vote: I like it +9 Vote: I do not like it

c++ is better