A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2017-September/149133.html below:

[Python-Dev] Inplace operations for PyLong objects

[Python-Dev] Inplace operations for PyLong objects [Python-Dev] Inplace operations for PyLong objectsGreg Ewing greg.ewing at canterbury.ac.nz
Fri Sep 1 21:10:23 EDT 2017
Chris Angelico wrote:
> This particular example is safe, because the arguments get passed
> individually - so 'args' has one reference, plus there's one more for
> the actual function call

However, that's also true when you use the += operator,
so if the optimisation is to trigger at all in any useful
case, the refcount threshold needs to be set higher than
1.

Some experiments I did suggest that if you set it high
enough for x += y to trigger it, then it will also be
triggered in Joe's case.

BTW, isn't there already a similar optimisation somewhere
for concatenating strings? Does it still exist? How does
it avoid this issue?

-- 
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4