Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the start of a pull request to motivate making the hash function configurable. CRC32C is currently "hard-coded" a bit in the library, so to do this will take a bit of refactoring that might be easier for one of the FB team to do?
Anyway, with level style compaction and when not using compression or using compression only at higher levels, CRC32C is the highest or second highest function (after memcpy) in perf top.
One step to reduce this is to make abd70ec configurable again, but ideally one wants some kind of hash checksum.
Presenting xxHash from https://code.google.com/p/xxhash/
$ ./db_bench -benchmarks crc32c,xxhash
CPU: 4 * Intel(R) Core(TM) i7-3540M CPU @ 3.00GHz
crc32c: 1.311 micros/op 762735 ops/sec; 2979.4 MB/s (4K per op)
xxhash: 0.601 micros/op 1664997 ops/sec; 6503.9 MB/s (4K per op)