summaryrefslogtreecommitdiff
path: root/zaphod32_hash.h
Commit message (Collapse)AuthorAgeFilesLines
* zaphod32_hash.h - rework comment to be more legibleYves Orton2022-12-301-6/+11
|
* Do not cast away constnessBart Van Assche2022-12-131-1/+1
| | | | | | | Fix most compiler warnings caused by building Perl extensions with -Wcast-qual. This is realized by changing the type of multiple T * arguments into const T * and by changing a few (T *) casts into (const T *).
* hv_func.h, hv_macro.h: Rename compile-once guardKarl Williamson2020-11-021-1/+1
| | | | | These #defines are internal-only, so mark them as such by adding a trailing underscore to their names.
* Fix typosSamanta Navarro2020-10-031-1/+1
| | | | | | | | | For: https://github.com/Perl/perl5/pull/18201 Committer: Samanta Navarro is now a Perl author. To keep 'make test_porting' happy: Increment $VERSION in several files. Regenerate uconfig.h via './perl -Ilib regen/uconfig_h.pl'.
* Clean up U8TO*_LE macro implementationsMatt Turner2019-10-081-35/+0
| | | | | | | | | | | | The code guarded by #ifndef U32_ALIGNMENT_REQUIRED attempts to optimize byte-swapping by doing unaligned loads, but accessing data through unaligned pointers is undefined behavior in C. Moreover, compilers are more than capable of recognizing these open-coded byte-swap patterns and emitting a bswap instruction, or an unaligned load instruction, or a combined load, etc. There's no need for multiple paths to attain the desired result. See https://rt.perl.org/Ticket/Display.html?id=133495
* silence warnings when using zaphod32 on 64 bit buildsYves Orton2018-02-241-1/+1
| | | | | | if STRLEN is 64 bit, then there is truncation when using key_len to initialize the state. This causes problems with windows compilers especially. See comments from bulk88 in perl #132860 (which is not directly related to this patch, but is where it was discussed)
* comment out unreachable code and explain why it was/is thereYves Orton2017-12-011-1/+4
|
* fixups for portabilityYves Orton2017-10-141-18/+19
| | | | | a) some platforms want #define to start at col 0 b) some compilers want to know whether fallthrough is expected or not.
* hopefully better macros for building on x86Yves Orton2017-10-121-6/+37
|
* fix some thinkos in the new hash codeYves Orton2017-10-021-1/+1
| | | | | pointed out by Tux on irc. I dont think this will solve all his problems, but it is a first step....
* in hash init code preserve constnessYves Orton2017-09-131-1/+1
| | | | | | | | This causes warnings in some our builds as can be seen in some smoke reports: zaphod32_hash.h:185:17: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]
* do not overallocate in zaphod32_hashYves Orton2017-06-021-7/+9
| | | | | We don't use it, but it should be fixed regardless to sync with upstream which might.
* Restore "improve and update hash algorithm configuration docs in INSTALL"Yves Orton2017-06-011-2/+0
| | | | | | | | | | This reverts commit 9627bf7af087e000c169b623f1a4536976a0f6c1, and 2b2e489d8a432b3526cb21ef651bb9101ecd5b9d, which were reverts of commit e7e07d980872d020fd93a43cda96f72c8013af20 and of commit c25b844905729021ec43dcc6c244d99330d7260a resepctively. Updated docs to reflect new hash functions, along with some wordsmithing tweaks to make things read more smoothly (hopefully).
* Restore "Add new hashing and "hash with state" infrastructure"Yves Orton2017-06-011-0/+287
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e6a172f358c0f48c4b744dbd5e9ef6ff0b4ff289, which was a revert of a3bf60fbb1f05cd2c69d4ff0a2ef99537afdaba7. Add new hashing and "hash with state" infrastructure 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
* Revert "Add new hashing and "hash with state" infrastructure"Yves Orton2017-04-231-287/+0
| | | | | | This reverts commit a3bf60fbb1f05cd2c69d4ff0a2ef99537afdaba7. Accidentally pushed work pending unfreeze.
* Revert "remove dead comment"Yves Orton2017-04-231-0/+2
| | | | | | This reverts commit c25b844905729021ec43dcc6c244d99330d7260a. Accidentally pushed work pending un-freeze.
* remove dead commentYves Orton2017-04-231-2/+0
|
* Add new hashing and "hash with state" infrastructureYves Orton2017-04-231-0/+287
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