mirror of
https://github.com/borgbackup/borg.git
synced 2026-10-12 02:11:36 +00:00
Until now every chunker ran its simplest implementation unless a BORG_*_KERNEL env var named another one, because which kernel is fastest is not predictable from the instruction set. It is predictable per platform though, now that #10160 has benchmarks from a range of CPUs, so choose accordingly instead of leaving speed on the table by default: - fastcdc / buzhash64: neon on aarch64, scalar (the plain sequential loop, which the compiler folds into a single instruction there) on x86-64, blockwise elsewhere. - toeplitz-aes / rabin-aes / goldilocks-aes: wider is simply faster here, so vaes, else aes-ni on x86-64, aes-arm64 on aarch64, and evp where there is no AES hardware path. Both fall back where a build or a CPU does not have the preferred kernel. An env var still means exactly what it says: a kernel that cannot run here is an error, never a silent fallback. On an Apple M3 this makes the default chunkers 1.6x (goldilocks-aes) to 2.1x (buzhash64) faster.