Repository navigation
Commit 6a29c4c
committed
avoid get_class_attr for __hash__; read hash slot via mro_find_map
Reduce calls and lock acquisitions on hot paths by bypassing get_class_attr(__hash__) and directly resolving the hash implementation with mro_find_map(|cls| cls.slots.hash.load()).1 parent 41a956a commit 6a29c4c
1 file changed
Lines changed: 6 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
642 | 642 | | |
643 | 643 | | |
644 | 644 | | |
645 | | - | |
646 | | - | |
647 | | - | |
| 645 | + | |
| 646 | + | |
648 | 647 | | |
649 | 648 | | |
650 | | - | |
651 | | - | |
652 | | - | |
653 | | - | |
654 | | - | |
655 | | - | |
656 | | - | |
657 | | - | |
658 | | - | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
664 | 653 | | |
665 | 654 | | |
666 | 655 | | |
| |||
0 commit comments