|
|
Log in / Subscribe / Register

Complexity specification

Complexity specification

Posted Dec 5, 2025 9:01 UTC (Fri) by jeeger (subscriber, #104979)
Parent article: A "frozen" dictionary for Python

As Steve Dower noted, that optimization can be added later as long as the PEP does not specify that the operation must be O(n)
I might be misremembering from my Uni days, but all O(1) algorithms are also O(n), so the statement doesn't make sense. I'd be happy for someone to correct me though.


The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:

Note: you can avoid this step in the future by logging into your LWN account.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds