Assignment Versus Equality

Chris Angelico rosuav at gmail.com
Wed Jun 29 00:19:58 EDT 2016


On Wed, Jun 29, 2016 at 12:35 PM, Steven D'Aprano <steve at pearwood.info> wrote:
>
> Whereas some decisions are just dumb:
>
> https://www.jwz.org/blog/2010/10/every-day-i-learn-something-new-and-stupid/

"""It would also be reasonable to assume that any sane language
runtime would have integers transparently degrade to BIGNUMs, making
the choice of accuracy over speed, but of course that almost never
happens..."""

Python 2 did this, but Python 3 doesn't. Does this mean that:

1) The performance advantage of native integers is negligible?
2) The performance benefit of having two representations for integers
isn't worth the complexity of one data type having two
representations?
3) The advantage of merging the types was so great that it was done in
the most straight-forward way, and then nobody got around to doing
performance testing?
4) Something else?

ChrisA


More information about the Python-list mailing list