gh-146587: fix type slot assignment incase of multiple slots for same name by kumaraditya303 · Pull Request #146593 · python/cpython
kumaraditya303
changed the title
gh-146587: add fix type slot assignment incase of multiple slots for same name
gh-146587: fix type slot assignment incase of multiple slots for same name
Could you please take a look at sergey-miryanov@f26545a? WDYT?
It looks the same as this one except more complicated, you are also checking that if a slot has duplicates then only one of them should be filled isn't it?
I am not sure that the loop is big enough that there would be performance difference.
Yeah, it looks the same. Except we don’t need to iterate all slotdefs, because we precalculates dup indexes.
I wrote answer before your edit.
I don’t remember exactly how items in slotdefs, about 70 maybe 94 (edited). For dups we need iterate 2 or 3 items.
Yeah, it looks the same. Except we don’t need to iterate all slotdefs, because we precalculates dup indexes.
Alright, I implemented your suggestion.