[Patches] [ python-Patches-1316653 ] Py_INCREF/Py_DECREF with magic constant demo

SourceForge.net noreply at sourceforge.net
Wed Oct 12 06:48:43 CEST 2005


Patches item #1316653, was opened at 2005-10-07 17:10
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1316653&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Adam Olsen (rhamphoryncus)
Assigned to: Nobody/Anonymous (nobody)
Summary: Py_INCREF/Py_DECREF with magic constant demo

Initial Comment:
This is a simple "proof of concept" patch that shows
making Py_INCREF/Py_DECREF be no-ops when ob_refcnt is
set to a magic constant (to indicate only cyclic gc
should be used here) is not a signifigant performance
burden.

Normal Py_INCREF/Py_DECREF
rhamph at factor:~/src/Python-2.4.1$ ./python
Lib/test/pystone.py 500000
Pystone(1.1) time for 500000 passes = 13.34
This machine benchmarks at 37481.3 pystones/second

Modified Py_INCREF/Py_DECREF with magic constant
rhamph at factor:~/src/Python-2.4.1-sandbox$ ./python
Lib/test/pystone.py 500000
Pystone(1.1) time for 500000 passes = 13.38
This machine benchmarks at 37369.2 pystones/second

Posting to python-dev will be done momentarily.

----------------------------------------------------------------------

>Comment By: Neal Norwitz (nnorwitz)
Date: 2005-10-11 21:48

Message:
Logged In: YES 
user_id=33168

Adam IIRC you dropped this idea/went back to the drawing
board?  Is this patch still valid or should it be closed?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1316653&group_id=5470


More information about the Patches mailing list