Message301213
The method lookup fast path in _PyType_Lookup() does not apply during type creation, which is highly dominated by the performance of the dict lookups along the mro chain. Pre-calculating the name hash speeds up the creation of an empty class (i.e. "class Test: pass") by around 20%. Will send a pull request shortly. | |
| Date | User | Action | Args | | 2017-09-04 11:39:18 | scoder | set | recipients: + scoder | | 2017-09-04 11:39:18 | scoder | set | messageid: <1504525158.22.0.609539167408.issue31336@psf.upfronthosting.co.za> | | 2017-09-04 11:39:18 | scoder | link | issue31336 messages | | 2017-09-04 11:39:17 | scoder | create | | |