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
- abseil / Performance Hintsabseil.io
- 4/11/23stanfordpython.com
- Big-O Algorithm Complexity Cheat Sheet (Know Thy Complexities!) @ericdrowellbigocheatsheet.com
- 5. Data Structures — Python 3.14.6 documentationdocs.python.org
- The true cost of linked lists · YKarroumykarroum.com
- cpython/Objects/abstract.c at 3.10 · python/cpython · GitHubgithub.com
- CRDTs go brrrjosephg.com
- Python Gotcha: Join vs Concat - Andrew Wegnerandrewwegner.com
- Memory access is O(N^[1/3])vitalik.eth.limo
- Accidentally Quadraticaccidentallyquadratic.tumblr.com
- Build Your Own Databasenan.fyi
- abseil / Performance Hintsabseil.io