summaryrefslogtreecommitdiff
path: root/hv.h
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2022-04-08 18:05:24 +0200
committerYves Orton <demerphq@gmail.com>2022-04-19 19:37:29 +0800
commitd4c01272cf568f8e4d3c4e19495db1e64827a8be (patch)
tree351948ba984cb1ffcda8410e5f57505099ac39f8 /hv.h
parent6241e4b3800e2717fea33ceb7b816b5dd83fc70d (diff)
downloadperl-d4c01272cf568f8e4d3c4e19495db1e64827a8be.tar.gz
hv.* - disable unshared keys except when requested
This disables the new unshared hash key logic by default. People who wish to try it out can enable it at build time with -DPERL_USE_UNSHARED_KEYS_IN_LARGE_HASHES in the configure process.
Diffstat (limited to 'hv.h')
-rw-r--r--hv.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/hv.h b/hv.h
index bd81e5750c..2c5e796d9b 100644
--- a/hv.h
+++ b/hv.h
@@ -28,6 +28,13 @@
# define PERL_HASH_ITER_BUCKET(iter) (((iter)->xhv_riter) ^ ((iter)->xhv_rand))
#endif
+#ifdef PERL_USE_UNSHARED_KEYS_IN_LARGE_HASHES
+#define LARGE_HASH_HEURISTIC(hv,new_max) S_large_hash_heuristic(aTHX_ (hv), (new_max))
+#else
+#define LARGE_HASH_HEURISTIC(hv,new_max) 0
+#endif
+
+
/* entry in hash value chain */
struct he {
/* Keep hent_next first in this structure, because sv_free_arenas take