
Python sets and dictionaries can have quadratic-time performance
Python developers have discovered that operations on sets and dictionaries can degrade to quadratic time under certain conditions, such as hash collisions or poorly distributed keys. The issue arises when the interpreter must rehash or resize internal structures, leading to O(n²) complexity for insertions or lookups. A patch is expected soon.