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.

classification
Title: Py_INCREF/Py_DECREF with magic constant demo
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Rhamphoryncus, nnorwitz
Priority: normal Keywords: patch

Created on 2005-10-08 00:10 by Rhamphoryncus, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
sandbox.diff Rhamphoryncus, 2005-10-08 00:10
Messages (3)
msg48846 - (view) Author: Adam Olsen (Rhamphoryncus) Date: 2005-10-08 00:10
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@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@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.
msg48847 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-10-12 04:48
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?
msg48848 - (view) Author: Adam Olsen (Rhamphoryncus) Date: 2005-10-12 05:21
Logged In: YES 
user_id=12364

This was never intended as a usable patch, but rather as a
demonstration.  Since there doesn't seem to be any flag for
that I suppose closing is the next best thing.
History
Date User Action Args
2022-04-11 14:56:13adminsetgithub: 42460
2005-10-08 00:10:59Rhamphoryncuscreate