Python 2.7 or Python 3 (for speed)? -
i've looked around answers , seems old or outdated. has python 3 been updated yet it's decently faster python 2.7 or still better off sticking workable code?
the issue isn't speed -- they're either same speed, or python 3.x faster (depending on benchmarks at). more specifically, python 2 used faster, apparently they're on par each other (?). see comments , slide deck (towards back).
the core devs actively working on optimizing python 3 -- each new release of python 3 has been faster last. can keep abreast of latest proposals , ideas on optimizing python (as many complications) monitoring python-dev mailing list.
rather, reason many people used give not updated because when python 3 came out, , several years after, majority of python libraries not updated work on python 3.x. however, thankfully, situation vastly improved today -- majority of 3rd party libraries python 3 compatible.
the python faq contains more info. can check python wall of superpowers or py3 readiness overview of popular python libraries compatible python 3.
update: (summer 2017)
i feel obligated note support python 2 formally ending in 2020.
many 3rd party libraries planning on following suit -- large subset of scientific ecosystem (e.g. matplotlib, pandas, ipython) planning on dropping support python 2 in 2020, django dropping support... wouldn't surprised if other libraries same.
so, if you're interested in making sure can use latest , greatest features in either python or favorite library, should migrating python 3 sooner rather later.
here guides on converting python 2 3 code:
Comments
Post a Comment