Give Emacs another performance boost

This commit is contained in:
Justine Tunney 2023-08-18 09:34:14 -07:00
parent 5b42c810a5
commit 9c7b81ee0f
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
30 changed files with 253 additions and 102 deletions

View file

@ -23,15 +23,17 @@
#include "third_party/zlib/cpu_features.internal.h"
#include "third_party/zlib/zlib.h"
#if defined(__aarch64__) && defined(__ARM_NEON)
int arm_cpu_enable_crc32;
int arm_cpu_enable_pmull;
void(cpu_check_features)(void) {
#if defined(__aarch64__) && defined(__ARM_NEON)
void cpu_check_features(void) {
if (IsLinux()) {
unsigned long features = getauxval(AT_HWCAP);
arm_cpu_enable_crc32 = !!(features & HWCAP_CRC32);
arm_cpu_enable_pmull = !!(features & HWCAP_PMULL);
}
#endif
}
#endif