We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2aa4cd6 commit a2ed8a2Copy full SHA for a2ed8a2
immutables/_map.h
@@ -4,6 +4,17 @@
4
#include <stdint.h>
5
#include "Python.h"
6
7
+/*
8
+HAMT tree is shaped by hashes of keys. Every group of 5 bits of a hash denotes
9
+the exact position of the key in one level of the tree. Since we're using
10
+32 bit hashes, we can have at most 7 such levels. Although if there are
11
+two distinct keys with equal hashes, they will have to occupy the same
12
+cell in the 7th level of the tree -- so we'd put them in a "collision" node.
13
+Which brings the total possible tree depth to 8. Read more about the actual
14
+layout of the HAMT tree in `_map.c`.
15
+
16
+This constant is used to define a datastucture for storing iteration state.
17
+*/
18
#define _Py_HAMT_MAX_TREE_DEPTH 8
19
20
0 commit comments