From 79ecacb6c01f82377305a734b220c2aadd41d0f1 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sat, 26 Oct 2019 11:11:37 +0200 Subject: [PATCH] Clarify what dict to use --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6e45c791..bd3798fb 100644 --- a/README.md +++ b/README.md @@ -1947,7 +1947,15 @@ Several dictionnaries are proposed. The "best" to use depends on the data type and in particular: * the size of the data, -* the inner cost of computing the hash. +* the inner cost of copying the object, +* the inner cost of computing the hash of the object, +* the inner cost of comparing the objects, +* the load factor. + +For small, fast types (integer, or floats, or pair of such types), +DICT\_OA\_DEF2 may be the best to use. +For medium type, DICT\_DEF2 with mempool activated may be better. +For even larger object, DICT\_STOREHASH\_DEF2 may be better. #### DICT\_DEF2(name, key\_type[, key\_oplist], value\_type[, value\_oplist])