|
|
Subscribe / Log in / New account

Python 3 at Facebook

Python 3 at Facebook

Posted Jul 3, 2018 0:29 UTC (Tue) by Cyberax (✭ supporter ✭, #52523)
In reply to: Python 3 at Facebook by starchip
Parent article: Python 3 at Facebook

> What Jason has is an extremely bad overall Company strategy regarding IT infrastructure that he had to fight against.
Bad strategy? Why?

Py2 works. It's better than Py3. It's generally faster than Py3. It's stable. It's going to be supported until at least 2027.

Now convince me why people need to convert to Py3 religion. Is it going to lead to significant savings? (nope) Perhaps it's going to make people more productive? (nope) Does it solve long-standing architectural issues? (nope, see GIL)

So what are the business reasons for the migration?


to post comments

Python 3 at Facebook

Posted Jul 3, 2018 11:18 UTC (Tue) by anselm (subscriber, #2796) [Link] (3 responses)

At least the speed argument seems to no longer apply. From the article:

The developers simply ran 2to3 on the code and fixed a few things that it complained about. When they ran the resulting code, they found it was 40% faster and used half the memory. This points to a persistent myth that Fried has heard: Python 3 is slower than Python 2. That may have been true for earlier releases of Python 3, but it is definitely not true now, he said.

It's reasonably easy to imagine scenarios where that would be an important factor.

Python 3 at Facebook

Posted Jul 3, 2018 17:55 UTC (Tue) by Cyberax (✭ supporter ✭, #52523) [Link] (2 responses)

It can go either way. Py3 in general used to be slower than Py2: https://stackoverflow.com/questions/37052139/string-perfo... or https://www.raspberrypi.org/forums/viewtopic.php?t=183829 It's getting better, but it's still not that great.

I did several migrations and sometimes we actually got significant speed improvements. Not because of 2->3 switch itself, but because people went through the codebase and fixed stuff like the use of .items() instead of .iteritems().

Python 3 at Facebook

Posted Jul 4, 2018 0:32 UTC (Wed) by anselm (subscriber, #2796) [Link]

It probably depends on the use case but there has been considerable optimisation work done in recent Python versions (the web pages you cited mostly talk about Python 3.4, which from an optimisataion POV is ancient history). There will be even more improvement in the future but we're now at a point where a fear of performance regressions compared to Python 2.7 shouldn't keep one from moving to Python 3.6 or 3.7.

Python 3 at Facebook

Posted Jul 4, 2018 5:23 UTC (Wed) by daniel (guest, #3181) [Link]

Python2 and Python3 are both pathetically slow, because efficiency is not ingrained in the project culture. But they are better than Bash, that is the best I can say about that. Python stewards consciously choose to pigeonhole Python as a scripting language for no discernible reason. My advice for language learners these days: start with Python to get the idea, then move on quickly to Go.

Python 3 at Facebook

Posted Jul 8, 2018 11:03 UTC (Sun) by morksigens (guest, #92681) [Link] (1 responses)

I find your anti-Python-3 posts quite silly and bitter. I develop in Python 3 day to day and can't wait to drop Python 2 support everywhere. Python 3 has 10 years of language evolution in it, 2.x has not. It's many small nice things that add up. Also, regarding speed: https://hackernoon.com/which-is-the-fastest-version-of-py....

Python 3 at Facebook

Posted Jul 8, 2018 23:02 UTC (Sun) by Cyberax (✭ supporter ✭, #52523) [Link]

> I find your anti-Python-3 posts quite silly and bitter.
I suppose it's the best argument Py3 advocates have. I proposed a simple exercise - try to convince me with objective facts why Py3 switch is warranted.

> I develop in Python 3 day to day and can't wait to drop Python 2 support everywhere.
I have it on good authority that KoolAid also tastes fine.

> Python 3 has 10 years of language evolution in it, 2.x has not.
In other words: "Python 2.7, being a great improvement on its successor, has managed to skip 10 years of language devolution".

> Also, regarding speed

Let me quote:
"Python 3.7 is 1.19x faster than Python 2.7, but the only Python 3.x release to beat the Python 2.7 benchmark I ran. The speed.python.org benchmark shows similar results."

So Python _only_ _now_ has caught up with Py2.7. And that only barely.

Py3.7 had been released quite literally a couple of weeks ago and it is not supported by RHEL or Debian Stable, so I wouldn't be able to use it for at least couple more years.

Python 3 at Facebook

Posted Jul 11, 2018 12:16 UTC (Wed) by mathewcohle (guest, #118622) [Link]

One strict business reason might be the hiring of new developers: I've encountered that people shrug when hear that the code base is in Py2.7


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds