Author rhettinger
Recipients barry, eric.smith, eric.snow, llllllllll, rhettinger
Date 2015-04-27.07:26:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1430119608.07.0.334407093055.issue23910@psf.upfronthosting.co.za>
In-reply-to
Content
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().
History
Date User Action Args
2015-04-27 07:26:48rhettingersetrecipients: + rhettinger, barry, eric.smith, eric.snow, llllllllll
2015-04-27 07:26:48rhettingersetmessageid: <1430119608.07.0.334407093055.issue23910@psf.upfronthosting.co.za>
2015-04-27 07:26:48rhettingerlinkissue23910 messages
2015-04-27 07:26:47rhettingercreate