-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Description
RISC-V C API Specification says that if the C compiler defines __riscv_misaligned_fast, then unaligned access is known to be fast.
Maybe we can update xxhash.h to add unaligned access for some RISC-V machines.
The related code:
Lines 2254 to 2260 in bfd8ad8
| #ifndef XXH_FORCE_ALIGN_CHECK /* can be defined externally */ | |
| /* don't check on sizeopt, x86, aarch64, or arm when unaligned access is available */ | |
| # if XXH_SIZE_OPT >= 1 || \ | |
| defined(__i386) || defined(__x86_64__) || defined(__aarch64__) || defined(__ARM_FEATURE_UNALIGNED) \ | |
| || defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM64) || defined(_M_ARM) /* visual */ | |
| # define XXH_FORCE_ALIGN_CHECK 0 | |
| # else |
felixhandte
Metadata
Metadata
Assignees
Labels
No labels