This gist contains raw data from Pyperformance runs on three commits.
-
The "base" commit from main branch is https://github.com/carljm/cpython/commit/46a116c1c9f6b60a3d35ab9a419f8eee5de2542e
-
The "watch" commit implements dict watchers, but no dicts are watched: https://github.com/carljm/cpython/commit/32f067fa4767aaeea5deceb6904eb860d7aa9209
-
The "watched" commit also marks all module global dicts as watched: https://github.com/carljm/cpython/commit/5d51a3e8bc77cc105ffc5b11bd3a2099931fdde9
The two comparison tables are base-vs-watch and base-vs-watched. The "watched" commit is not intended to land, it's purely to test performance when module globals are watched and we have to check for a callback on every write to a module global; i.e. we are paying the cost of watching all module globals, but for no benefit.
Benchmarks were run on an idle AWS c5n.metal
instance. CPython was configured with
./configure --enable-optimizations
.