From ab6d4871d885ef7b225d7c9d552b7ca09398d28c Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Wed, 15 Jan 2020 19:49:11 -0500 Subject: [PATCH] Adding haswell amal. tests (#447) * Adding an extra test. * Disabling the AVX-accelerated minifier. * Updating amalgamation. --- .circleci/config.yml | 3 +++ singleheader/amalgamation_demo.cpp | 2 +- singleheader/simdjson.cpp | 6 +++--- singleheader/simdjson.h | 7 ++----- src/jsonminifier.cpp | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6af6a9b5..b76ab993 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,8 +24,11 @@ commands: - checkout - run: make - run: make amalgamate + - run: ARCHFLAGS=-march=haswell make amalgamate # some users do this: https://github.com/lemire/simdjson/issues/444 - run: make test - run: make checkperf + - run: make clean + - run: ARCHFLAGS=-march=haswell make test # this breaks runtime dispatch, but see https://github.com/lemire/simdjson/issues/444... this is a code robustness test cmake_test: steps: - run: apt-get update -qq diff --git a/singleheader/amalgamation_demo.cpp b/singleheader/amalgamation_demo.cpp index 06e5166b..f7772925 100755 --- a/singleheader/amalgamation_demo.cpp +++ b/singleheader/amalgamation_demo.cpp @@ -1,4 +1,4 @@ -/* auto-generated on Wed Jan 15 13:09:01 EST 2020. Do not edit! */ +/* auto-generated on Wed Jan 15 15:50:50 EST 2020. Do not edit! */ #include #include "simdjson.h" diff --git a/singleheader/simdjson.cpp b/singleheader/simdjson.cpp index 5c960281..7b18a6f6 100755 --- a/singleheader/simdjson.cpp +++ b/singleheader/simdjson.cpp @@ -1,4 +1,4 @@ -/* auto-generated on Wed Jan 15 13:09:01 EST 2020. Do not edit! */ +/* auto-generated on Wed Jan 15 15:50:50 EST 2020. Do not edit! */ #include "simdjson.h" /* used for http://dmalloc.com/ Dmalloc - Debug Malloc Library */ @@ -582,7 +582,7 @@ padded_string get_corpus(const std::string &filename) { /* begin file src/jsonminifier.cpp */ #include -#ifndef __AVX2__ +#ifndef SIMDJSON_ISSUE384RESOLVED // to avoid tripping users namespace simdjson { static uint8_t jump_table[256 * 3] = { @@ -642,7 +642,7 @@ size_t json_minify(const unsigned char *bytes, size_t how_many, #else // -// This fast code is disabled in the context of runtime dispatching. +// This fast code is disabled. // See issue https://github.com/lemire/simdjson/issues/384 // #include diff --git a/singleheader/simdjson.h b/singleheader/simdjson.h index 7f97b97b..e3ca7987 100755 --- a/singleheader/simdjson.h +++ b/singleheader/simdjson.h @@ -1,4 +1,4 @@ -/* auto-generated on Wed Jan 15 13:09:01 EST 2020. Do not edit! */ +/* auto-generated on Wed Jan 15 15:50:50 EST 2020. Do not edit! */ /* begin file include/simdjson/simdjson_version.h */ // /include/simdjson/simdjson_version.h automatically generated by release.py, // do not change by hand @@ -570,13 +570,10 @@ const std::string &error_message(const int); #define SIMDJSON_MAXSIZE_BYTES 0xFFFFFFFF // the input buf should be readable up to buf + SIMDJSON_PADDING -#ifdef __AVX2__ -#define SIMDJSON_PADDING sizeof(__m256i) -#else // this is a stopgap; there should be a better description of the // main loop and its behavior that abstracts over this +// See https://github.com/lemire/simdjson/issues/174 #define SIMDJSON_PADDING 32 -#endif #if defined(__GNUC__) // Marks a block with a name so that MCA analysis can see it. diff --git a/src/jsonminifier.cpp b/src/jsonminifier.cpp index a6648351..52f4995a 100644 --- a/src/jsonminifier.cpp +++ b/src/jsonminifier.cpp @@ -1,7 +1,7 @@ #include "simdjson/portability.h" #include -#ifndef __AVX2__ +#ifndef SIMDJSON_ISSUE384RESOLVED // to avoid tripping users namespace simdjson { static uint8_t jump_table[256 * 3] = { @@ -61,7 +61,7 @@ size_t json_minify(const unsigned char *bytes, size_t how_many, #else // -// This fast code is disabled in the context of runtime dispatching. +// This fast code is disabled. // See issue https://github.com/lemire/simdjson/issues/384 // #include "simdprune_tables.h"