You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use siphash on architectures that support misaligned accesses (#825)
Python uses siphash (siphash13 in 3.11+, siphash24 on older versions) as
the default internal hashing algorithm, but only on architectures that
support misaligned accesses, i.e., reads/writes of integers from a
memory address that is not a round multiple of the integer size. On
other architectures it uses fnv, which is not supported by Numba and
raises a warning. The distinction between architectures is done by a
configure-time code execution check, which is not supported on our cross
builds, including on our x86_64_vN microarchitecture builds (see #599),
so Python defaults to assuming it is not supported.
Hard-code a list of platforms that are known to support misaligned
accesses just fine. Credit to
https://blog.vitlabuda.cz/2025/01/22/unaligned-memory-access-on-various-cpu-architectures.html
for pointing out that the Linux kernel has this pretty well documented
in Kconfig.
Note that loongarch and riscv have optional support for misaligned
access, and it's quite possible that the hardware that people actually
use have support for them (or that we are targeting a limited hardware
profile anyway for some reason that implies support for misaligned
access). I've left them out for now but we can add them later.
Fixes#683.
0 commit comments