minor hash_fn() followups
- remove an odd space - "rounds" is fine, but "bits" is more precise - after fixing a typo, four parallel hashes no longer was any faster (or slower) than three, so I consider that TODO now done Change-Id: I7fff29640c1238229418bd8385b3b3aeae4ad68f Reviewed-on: https://skia-review.googlesource.com/c/skia/+/338621 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
56b1b80795
commit
6e5079a280
@ -39,7 +39,7 @@
|
|||||||
std::array<uint32_t, 256> t;
|
std::array<uint32_t, 256> t;
|
||||||
for (int i = 0; i < 256; i++) {
|
for (int i = 0; i < 256; i++) {
|
||||||
t[i] = i;
|
t[i] = i;
|
||||||
for (int rounds = 8; rounds --> 0; ) {
|
for (int bits = 8; bits --> 0; ) {
|
||||||
t[i] = (t[i] & 1) ? (t[i] >> 1) ^ 0x82f63b78
|
t[i] = (t[i] & 1) ? (t[i] >> 1) ^ 0x82f63b78
|
||||||
: (t[i] >> 1);
|
: (t[i] >> 1);
|
||||||
}
|
}
|
||||||
@ -104,7 +104,6 @@ namespace SK_OPTS_NS {
|
|||||||
|
|
||||||
// Handle the bulk with a few data-parallel independent hashes,
|
// Handle the bulk with a few data-parallel independent hashes,
|
||||||
// taking advantage of pipelining and superscalar execution.
|
// taking advantage of pipelining and superscalar execution.
|
||||||
// TODO: four parallel hashes looks faster than three?
|
|
||||||
if (len >= 24) {
|
if (len >= 24) {
|
||||||
uint32_t a = seed,
|
uint32_t a = seed,
|
||||||
b = seed,
|
b = seed,
|
||||||
|
Loading…
Reference in New Issue
Block a user