Time complexity of operations on built-in types — Python 3.16.0a0 documentation
This page documents the time complexity of various operations on built-in types in CPython. Other Python implementations may have different performance characteristics. Additionally, the listed cos...
This page documents the time complexity of various operations on built-in types in CPython. Other Python implementations may have different performance characteristics. Additionally, the listed costs assume exact built-in types, as instances of subclasses may have different costs. We use Big O notation to describe how the running time of an operation grows with the size of its inputs. Unless stated otherwise, n denotes the number of elements currently in the container, and k is the value of a numeric parameter, such as an index or a repeat count. list¶ Lists are mutable sequences; for…
saved by
related reading
- Big Osamwho.dev
- 9. Classes — Python 3.14.6 documentationdocs.python.org
- Memory access is O(N^[1/3])vitalik.eth.limo
- Python's Array: Working With Numeric Data Efficiently – Real Pythonrealpython.com
- Big O Cheat Sheet – Time Complexity Chartfreecodecamp.org
- styleguide | Style guides for Google-originated open-source projectsgoogle.github.io
- 5. Data Structures — Python 3.14.6 documentationdocs.python.org
- Big-O Algorithm Complexity Cheat Sheet (Know Thy Complexities!) @ericdrowellbigocheatsheet.com
- 4/11/23stanfordpython.com
- Static search trees: 40x faster than binary search · CuriousCodingcuriouscoding.nl
- The true cost of linked lists · YKarroumykarroum.com
- cpython/Objects/abstract.c at 3.10 · python/cpython · GitHubgithub.com