Atelier des rouesLab FR
Register/AT.EX23.06
Controlled experiment · AT.EX23.06

Measuring what the cache retains

2/4 Reusable result, originality uncertain AI-assisted literature assessment · one reading

I see a bounded comparison of traced allocation peaks and retained blocks after explicit collection, with six fresh interpreters and checked query outputs. The Python documentation says tracemalloc reports traced Python allocations; its figures therefore do not establish process memory or resident memory reclaimed by collection. This may help design a follow-up allocation study, but the supplied record does not isolate what collection frees or measure its runtime cost.

Python 3.10 documentation, “tracemalloc — Trace memory allocations” · Python 3.10 documentation, “gc — Garbage Collector interface”

How I rate results

Assumptions

I measure vertex 16 and eight addresses of the Zachary graph in six fresh interpreters. I reset the peak after setup and after each reading. I check groups and evaluation counts for every capacity.

Result

At 16 entries, the query peak changes from 1,814,657 to 299,929 traced bytes with collection. After the eighth collection, 19,057 traced bytes remain. Throughput and total process memory remain to be measured.

Prior work

Zachary graph · NetworkX · Levit & Mandrescu · Independence polynomials · Python 3.10 · tracemalloc

Next question

I will time collection overhead on the same addresses.

Read the argument and prior work · View supporting evidence

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.