summaryrefslogtreecommitdiff
path: root/rts/Hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/Hash.c')
-rw-r--r--rts/Hash.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/rts/Hash.c b/rts/Hash.c
index 6e1873ff29..39c5360f56 100644
--- a/rts/Hash.c
+++ b/rts/Hash.c
@@ -13,6 +13,19 @@
#include "Hash.h"
#include "RtsUtils.h"
+
+/* This file needs to be compiled with vectorization enabled. Unfortunately
+ since we compile these things these days with cabal we can no longer
+ specify optimization per file. So we have to resort to pragmas. */
+#if defined(__GNUC__) || defined(__GNUG__)
+#pragma GCC push_options
+#pragma GCC optimize ("O3")
+#endif
+
+#define XXH_NAMESPACE __rts_
+#define XXH_STATIC_LINKING_ONLY /* access advanced declarations */
+#define XXH_PRIVATE_API
+
#include "xxhash.h"
#include <string.h>