[issue23910] property_descr_get reuse argument tuple

2018-10-01 Thread STINNER Victor


STINNER Victor  added the comment:

This optimization caused multiple crashes, so it has been decided to remove it 
:-( See bpo-30156.

--
nosy: +vstinner

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23910] property_descr_get reuse argument tuple

2015-05-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This patch caused crash with C implementation of lru_cache (issue14373). Opened 
issue24276 for fixing this.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23910
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23910] property_descr_get reuse argument tuple

2015-04-30 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 661cdbd617b8 by Raymond Hettinger in branch 'default':
Issue #23910: Optimize property() getter calls.  Patch by Joe Jevnik
https://hg.python.org/cpython/rev/661cdbd617b8

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23910
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23910] property_descr_get reuse argument tuple

2015-04-30 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23910
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23910] property_descr_get reuse argument tuple

2015-04-29 Thread Joe Jevnik

Joe Jevnik added the comment:

I don't think that we need to worry about reusing the single argument tuple in 
a recursive situation because we never need the value after we start the call. 
We also just write our new value and then clean up with a NULL to make sure 
that we don't blow up when we dealloc the tuple. For example:

 class C(object):
... @property
... def f(self):
... return D().f
... 
 class D(object):
... @property
... def f(self):
... return 1
... 
 C().f
1


This works with recursive properties.
I also think that is is getting cleaned up on shutdown, if I put a pointer to 
garbage in the tuple, the interpreter blows up on shutdown; this makes me think 
that tuple_dealloc is being called somewhere. About putting the tuple on the 
property instance, that would nice for memory management; however, that 
increases the memory overhead of each property. This also means that we would 
only get the faster lookup after the property has been accessed once; this is 
fine but the current implementation makes it so that all properties are faster 
after any of them are looked up once. I could be wrong about the cleanup though.

I am also updating the title and headers because this issue is no longer about 
namedtuple.

--
components: +Interpreter Core -Extension Modules
title: C implementation  of namedtuple (WIP) - property_descr_get reuse 
argument tuple

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23910
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com