| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
This is a good idea, IMHO. I had a similar PR but Mark's is more elegant than mine. |
Sorry, something went wrong.
|
🤖 New build scheduled with the buildbot fleet by @markshannon for commit 8aa20f2 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F132280%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
Sorry, something went wrong.
|
Initial performance numbers are a bit down. 0.2% - 1.6% slower. I'm testing another branch that adds PyThreadState * as a parameter to _PyDealloc, which might reduce the impact. |
Sorry, something went wrong.
|
With faster recursion checks, performance is mixed but no worse overall:
Although the 1.5% slowdown on linux x86 is concerning. I also tried passing in the thread state as a parameter to _Py_Dealloc which is a much larger change. Results were a bit worse than this PR:
|
Sorry, something went wrong.
|
Maybe perf will be better with just one additional if for a decref that is not a container. So you have an implementation of decref for containers, and do one if to decide whether to apply it or stay with the current one. |
Sorry, something went wrong.
Do you mean a test in Py_DECREF or in Py_Dealloc? Adding a branch in Py_Dealloc would save the stack checks, but those are cheap. Getting the "margin" is a load, subtract and shift. Testing for collections is more expensive. PyObject_IS_GC does three loads, two of which are dependent on the first. |
Sorry, something went wrong.
Sorry, yeah, dealloc. Maybe not worth it. |
Sorry, something went wrong.
There was a problem hiding this comment.
The overall design LGTM.
I added a few comments.
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot s390x RHEL8 3.x (tier-3) has failed when building commit 44e4c47. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/#/builders/509/builds/9127 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x/build/Lib/test/test_external_inspection.py", line 531, in test_async_global_awaited_by
self.assertEqual([[['echo_client_spam'], 'echo client spam', [[['main'], 'Task-1', []]]]], entries[-1][1])
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Lists differ: [[['echo_client_spam'], 'echo client spam', [[['main'], 'Task-1', []]]]] != []
|
Sorry, something went wrong.
test_recursive_pickle (test.test_functools.TestPartialPy.test_recursive_pickle) ... Objects/classobject.c:247: _PyObject_GC_UNTRACK: Assertion "_PyObject_GC_IS_TRACKED(((PyObject*)(op)))" failed: object not tracked by the garbage collector Enable tracemalloc to get the memory block allocation traceback object address : 0x3ffae27c8f0 object refcount : 0 object type : 0x1669768 object type name: method object repr : <refcnt 0 at 0x3ffae27c8f0> Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed Python runtime state: initialized Current thread 0x000003ffb6177270 [python] (most recent call first): File "/home/buildbot/buildarea/3.x.cstratak-rhel8-s390x/build/Lib/test/test_functools.py", line 420 in test_recursive_pickle (...) |
Sorry, something went wrong.
Replace _PyObject_GC_UNTRACK() with PyObject_GC_UnTrack() to not fail if the method was already untracked.
…ythonGH-132280)" This reverts commit 44e4c47.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.