bpo-44337: Improve LOAD_ATTR specialization (GH-26759)

* Specialize obj.__class__ with LOAD_ATTR_SLOT

* Specialize instance attribute lookup with attribute on class, provided attribute on class is not an overriding descriptor.

* Add stat for how many times the unquickened instruction has executed.
This commit is contained in:
Mark Shannon 2021-06-21 11:49:21 +01:00 committed by GitHub
parent 82e5c28af7
commit fb68791a26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 179 additions and 72 deletions

View file

@ -336,6 +336,7 @@ typedef struct _stats {
uint64_t deferred;
uint64_t miss;
uint64_t deopt;
uint64_t unquickened;
#if SPECIALIZATION_STATS_DETAILED
PyObject *miss_types;
#endif