Skip to content

Commit

Permalink
Add new hashing and "hash with state" infrastructure
Browse files Browse the repository at this point in the history
This adds support for three new hash functions: StadtX, Zaphod32 and SBOX,
and reworks some of our hash internals infrastructure to do so.

SBOX is special in that it is designed to be used in conjuction with any
other hash function for hashing short strings very efficiently and very
securely. It features compile time options on how much memory and startup
time are traded off to control the length of keys that SBOX hashes.

This also adds support for caching the hash values of single byte characters
which can be used in conjuction with any other hash, including SBOX, although
SBOX itself is as fast as the lookup cache, so typically you wouldnt use both
at the same time.

This also *removes* support for Jenkins One-At-A-Time. It has served us
well, but it's day is done.

This patch adds three new files: zaphod32_hash.h, stadtx_hash.h,
sbox32_hash.h
  • Loading branch information
demerphq committed Apr 23, 2017
1 parent 05f97de commit a3bf60f
Show file tree
Hide file tree
Showing 10 changed files with 2,642 additions and 281 deletions.
3 changes: 3 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -5207,8 +5207,10 @@ regexp.h Public declarations for the above
regnodes.h Description of nodes of RE engine
run.c The interpreter loop
runtests.SH A script that generates runtests
sbox32_hash.h SBox hash code (32 Bit SBOX based hash function)
scope.c Scope entry and exit code
scope.h Scope entry and exit header
stadtx_hash.h StadtX hash code (64 Bit fast hash function)
sv.c Scalar value code
sv.h Scalar value header
symbian/bld.inf Symbian sample app build config
Expand Down Expand Up @@ -6027,3 +6029,4 @@ win32/wince.h WinCE port
win32/wincesck.c WinCE port
write_buildcustomize.pl Generate lib/buildcustomize.pl
XSUB.h Include file for extension subroutines
zaphod32_hash.h Zaphod32 hash code (32 bit fast hash function)
4 changes: 4 additions & 0 deletions embedvar.h
Original file line number Diff line number Diff line change
Expand Up @@ -385,10 +385,14 @@
#define PL_Gdollarzero_mutex (my_vars->Gdollarzero_mutex)
#define PL_fold_locale (my_vars->Gfold_locale)
#define PL_Gfold_locale (my_vars->Gfold_locale)
#define PL_hash_chars (my_vars->Ghash_chars)
#define PL_Ghash_chars (my_vars->Ghash_chars)
#define PL_hash_seed (my_vars->Ghash_seed)
#define PL_Ghash_seed (my_vars->Ghash_seed)
#define PL_hash_seed_set (my_vars->Ghash_seed_set)
#define PL_Ghash_seed_set (my_vars->Ghash_seed_set)
#define PL_hash_state (my_vars->Ghash_state)
#define PL_Ghash_state (my_vars->Ghash_state)
#define PL_hints_mutex (my_vars->Ghints_mutex)
#define PL_Ghints_mutex (my_vars->Ghints_mutex)
#define PL_keyword_plugin (my_vars->Gkeyword_plugin)
Expand Down
Loading

0 comments on commit a3bf60f

Please sign in to comment.