From da970585ca75ffd43106c08421e41c69d4ec8dd4 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Sun, 10 Mar 2019 10:44:37 -0400 Subject: [PATCH] Elaborating regarding single-header version. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 8e82aafba..b310438f2 100644 --- a/README.md +++ b/README.md @@ -113,8 +113,17 @@ int main(int argc, char *argv[]) { } ``` +We require hardware support for AVX2 instructions. You have to make sure that you instruct your +compiler to use these instructions as needed. Under compilers such as GNU GCC or LLVM clang, the +flag `-march=native` used on a recent Intel compiler (Haswell or better) is sufficient. You may +also use the flags `-mavx2 -mbmi2`. Under Visual Studio, you need to target x64 and add the +flag `/arch:AVX2`. + + Note: In some settings, it might be desirable to precompile `simdjson.cpp` instead of including it. + + ## Usage (old-school Makefile on platforms like Linux or macOS) Requirements: recent clang or gcc, and make. We recommend at least GNU GCC/G++ 7 or LLVM clang 6. A system like Linux or macOS is expected.