Skip to content

Commit ab6d487

Browse files
authored
Adding haswell amal. tests (simdjson#447)
* Adding an extra test. * Disabling the AVX-accelerated minifier. * Updating amalgamation.
1 parent f87e64f commit ab6d487

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

.circleci/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@ commands:
2424
- checkout
2525
- run: make
2626
- run: make amalgamate
27+
- run: ARCHFLAGS=-march=haswell make amalgamate # some users do this: https://github.com/lemire/simdjson/issues/444
2728
- run: make test
2829
- run: make checkperf
30+
- run: make clean
31+
- 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
2932
cmake_test:
3033
steps:
3134
- run: apt-get update -qq

singleheader/amalgamation_demo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on Wed Jan 15 13:09:01 EST 2020. Do not edit! */
1+
/* auto-generated on Wed Jan 15 15:50:50 EST 2020. Do not edit! */
22

33
#include <iostream>
44
#include "simdjson.h"

singleheader/simdjson.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on Wed Jan 15 13:09:01 EST 2020. Do not edit! */
1+
/* auto-generated on Wed Jan 15 15:50:50 EST 2020. Do not edit! */
22
#include "simdjson.h"
33

44
/* used for http://dmalloc.com/ Dmalloc - Debug Malloc Library */
@@ -582,7 +582,7 @@ padded_string get_corpus(const std::string &filename) {
582582
/* begin file src/jsonminifier.cpp */
583583
#include <cstdint>
584584

585-
#ifndef __AVX2__
585+
#ifndef SIMDJSON_ISSUE384RESOLVED // to avoid tripping users
586586

587587
namespace simdjson {
588588
static uint8_t jump_table[256 * 3] = {
@@ -642,7 +642,7 @@ size_t json_minify(const unsigned char *bytes, size_t how_many,
642642
#else
643643

644644
//
645-
// This fast code is disabled in the context of runtime dispatching.
645+
// This fast code is disabled.
646646
// See issue https://github.com/lemire/simdjson/issues/384
647647
//
648648
#include <cstring>

singleheader/simdjson.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on Wed Jan 15 13:09:01 EST 2020. Do not edit! */
1+
/* auto-generated on Wed Jan 15 15:50:50 EST 2020. Do not edit! */
22
/* begin file include/simdjson/simdjson_version.h */
33
// /include/simdjson/simdjson_version.h automatically generated by release.py,
44
// do not change by hand
@@ -570,13 +570,10 @@ const std::string &error_message(const int);
570570
#define SIMDJSON_MAXSIZE_BYTES 0xFFFFFFFF
571571

572572
// the input buf should be readable up to buf + SIMDJSON_PADDING
573-
#ifdef __AVX2__
574-
#define SIMDJSON_PADDING sizeof(__m256i)
575-
#else
576573
// this is a stopgap; there should be a better description of the
577574
// main loop and its behavior that abstracts over this
575+
// See https://github.com/lemire/simdjson/issues/174
578576
#define SIMDJSON_PADDING 32
579-
#endif
580577

581578
#if defined(__GNUC__)
582579
// Marks a block with a name so that MCA analysis can see it.

src/jsonminifier.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include "simdjson/portability.h"
22
#include <cstdint>
33

4-
#ifndef __AVX2__
4+
#ifndef SIMDJSON_ISSUE384RESOLVED // to avoid tripping users
55

66
namespace simdjson {
77
static uint8_t jump_table[256 * 3] = {
@@ -61,7 +61,7 @@ size_t json_minify(const unsigned char *bytes, size_t how_many,
6161
#else
6262

6363
//
64-
// This fast code is disabled in the context of runtime dispatching.
64+
// This fast code is disabled.
6565
// See issue https://github.com/lemire/simdjson/issues/384
6666
//
6767
#include "simdprune_tables.h"

0 commit comments

Comments
 (0)