Commit 926a02e
committed
Revert pre-size and empty fast path in lazy modules snapshot
Drop _PyDict_NewPresized and the empty-registry short-circuit. Both
were micro-optimizations with negligible impact for typical registry
sizes; the simpler unconditional PyDict_New + iterate path is easier
to read.1 parent a94f4e7 commit 926a02e
1 file changed
Lines changed: 17 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
294 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
295 | 297 | | |
| 298 | + | |
296 | 299 | | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
301 | 305 | | |
| 306 | + | |
302 | 307 | | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
319 | 312 | | |
| 313 | + | |
320 | 314 | | |
321 | 315 | | |
322 | 316 | | |
323 | 317 | | |
324 | | - | |
| 318 | + | |
325 | 319 | | |
326 | 320 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | 321 | | |
332 | 322 | | |
333 | 323 | | |
| |||
0 commit comments