@@ -355,9 +355,10 @@ but Perl source knows it as NV. (This is not "long doubles".)
355355=head3 Algorithmic Complexity Attacks on Hashes
356356
357357Perl 5.18 reworked the measures used to secure its hash function
358- from algorithmic complexity attacks. By default it will build with
358+ from algorithmic complexity attacks. By default perl5 will build with
359359all of these measures enabled along with support for controlling and
360- disabling them via environment variables.
360+ disabling them via environment variables. cperl defaults to faster hash
361+ tables and relies so far on a proper random seed.
361362
362363You can override various aspects of this feature by defining various
363364symbols during configure. An example might be:
@@ -383,15 +384,32 @@ purposes only.
383384 PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
384385 PERL_HASH_FUNC_ONE_AT_A_TIME_OLD
385386
387+ With cperl these additional hash functions can be used, here listed without the
388+ C<PERL_HASH_FUNC_> prefix:
389+
390+ FNV1A (default)
391+ FNV1A_YOSHIMITSUTRIAD
392+ MURMUR_HASH_64
393+ MURMUR_HASH_64A
394+ MURMUR_HASH_64b
395+ CRC32
396+ METRO64CRC
397+ METRO64
398+ SPOOKY32
399+
400+ See F<hv_func.h> and L<https://github.com/rurban/smhasher#smhasher>
401+ for an overview of the various qualities and problems.
402+
386403Perl 5.18 randomizes the order returned by keys(), values(), and each(),
387- and allows controlling this behavior by using of the PERL_PERTURB_KEYS
404+ and allows controlling this behavior by using of the C< PERL_PERTURB_KEYS>
388405option. You can disable this option entirely with the define:
389406
390407 PERL_PERTURB_KEYS_DISABLED
391408
392409You can disable the environment variable checks and specify the type of
393410key traversal randomization to be used by defining one of these:
394411
412+ PERL_PERTURB_KEYS_TOP (cperl only, default)
395413 PERL_PERTURB_KEYS_RANDOM
396414 PERL_PERTURB_KEYS_DETERMINISTIC
397415
0 commit comments