python dict object memorandum (mysterious document)

Overview

The dict object is divided into two elements. entry and index. The entry is an array of [hash value, key, value], and the index is the hash table itself, which contains numerical values. \ [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1](initial value) ↓ \ [-1, -1, -1, -1, -1, 0, -1, -1, -1, -1](there is one) ↓ \ [-1, -1, -1, -1, -1, 0, -1, -1, 1, -1](there is a second one) ↓ \ [-1, -1, -1, -1, -1, -2, -1, -1, 1, -1](Erase the first key)

It seems to behave like this. If you erase the value once entered, it becomes -2.

The minimum size of the hash table is 8. Of course, this table will be resized if it gets too full. The index type changes depending on the table size. When the table size is 128 or less, it becomes int8, when it is 2 ^ 15 or less, it becomes int16, when it is 2 ^ 31 or less, it becomes int32, and when it is larger, it becomes int64.

Recommended Posts

python dict object memorandum (mysterious document)
Python memorandum
Python Memorandum 2
Python memorandum
python memorandum
python memorandum
Python memorandum
python memorandum
Python memorandum
Python Basic Memorandum Part 3-About Object Orientation-
Python built-in object
Python pathlib memorandum
Python memorandum (algorithm)
Python built-in object
Python Dict category
Python memorandum [links]
Python here document
Python memorandum numbering variables
Python memorandum (personal bookmark)
Python basic memorandum part 2
Object oriented in python
About Python3 ... (Ellipsis object)
[Python] Iterative processing_Personal memorandum
Memorandum @ Python OR Seminar
python memorandum super basic
Effective Python Learning Memorandum Day 15 [15/100]
Cisco Memorandum _ Python config input
python document reading descriptor HowTo
How Python __dict__ is used
Effective Python Learning Memorandum Day 6 [6/100]
[python] Value of function object (?)
Effective Python Learning Memorandum Day 12 [12/100]
Effective Python Learning Memorandum Day 9 [9/100]
Null object comparison in Python
Python basic dict sort order
Effective Python Learning Memorandum Day 8 [8/100]
ABC memorandum [ABC163 C --managementr] (Python)
About python beginner's memorandum function
Memorandum @ Python OR Seminar: matplotlib
Use list-keyed dict in Python
[Python] SQLAlchemy error avoidance memorandum
A memorandum about correlation [Python]
Effective Python Learning Memorandum Day 14 [14/100]
Effective Python Learning Memorandum Day 1 [1/100]
Memorandum @ Python OR Seminar: Pulp
Effective Python Learning Memorandum Day 13 [13/100]
A memorandum about Python mock
Effective Python Learning Memorandum Day 3 [3/100]
Python variables and object IDs
Effective Python Learning Memorandum Day 5 [5/100]
Memorandum @ Python OR Seminar: Pandas
[python] Random number generation memorandum
Effective Python Learning Memorandum Day 4 [4/100]
Memorandum @ Python OR Seminar: scikit-learn
Effective Python Learning Memorandum Day 7 [7/100]
Effective Python Learning Memorandum Day 2 [2/100]
Document Python code with Doxygen
python parallel / asynchronous execution memorandum