➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 rhettinger
收信人 barry, eric.smith, eric.snow, llllllllll, rhettinger
日期 2015-04-27.07:26:47
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1430119608.07.0.334407093055.issue23910@psf.upfronthosting.co.za>
In-reply-to
内容
Hmm, the presense of _PyTuple_DebugMallocStats,  repeat_traverse, and visit_decref suggests that the profile may have been run with debugging code enabled and GC enabled.

The property patch looks good.  Depending on how far you want to go with this, you could save your tuple of length-1 statically and reuse it on successive calls if its refcnt doesn't grow (see the code for zip() for an example of how to do this).  That would save the PyTuple_New and tupledealloc calls.

Going further, potentially you could in-line some of the code it PyObject_Call, caching the callsite and its NULL check, and looking at the other steps to see if they are all necessary in the context of a property_desc_get().
历史
日期 用户 动作 参数
2015-04-27 07:26:48rhettinger修改recipients: + rhettinger, barry, eric.smith, eric.snow, llllllllll
2015-04-27 07:26:48rhettinger修改messageid: <1430119608.07.0.334407093055.issue23910@psf.upfronthosting.co.za>
2015-04-27 07:26:48rhettinger链接issue23910 messages
2015-04-27 07:26:47rhettinger创建