Repository navigation
Commit fa7ed79
committed
Inline the per-type method cache lookup on the default build
pythongh-145685 (per-type method cache) moved the type attribute cache lookup
into an out-of-line function returning a struct, on the hot path of
_PyType_LookupStackRefAndVersion. With the GIL no lock-free reader
protocol is needed, so probe heap types' caches inline. Static builtin
types and the free-threaded build keep using _PyTypeCache_Lookup().1 parent 6af40a6 commit fa7ed79
2 files changed
Lines changed: 43 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
39 | 72 | | |
40 | 73 | | |
41 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6215 | 6215 | | |
6216 | 6216 | | |
6217 | 6217 | | |
6218 | | - | |
| 6218 | + | |
| 6219 | + | |
| 6220 | + | |
| 6221 | + | |
| 6222 | + | |
| 6223 | + | |
| 6224 | + | |
| 6225 | + | |
| 6226 | + | |
| 6227 | + | |
6219 | 6228 | | |
6220 | 6229 | | |
6221 | 6230 | | |
| |||
0 commit comments