mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 34dcd33a88 | |||
| 17a1a8e187 |
+16
-1
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.14)
|
||||
project(
|
||||
simdjson
|
||||
# The version number is modified by tools/release.py
|
||||
VERSION 3.1.4
|
||||
VERSION 3.1.5
|
||||
DESCRIPTION "Parsing gigabytes of JSON per second"
|
||||
HOMEPAGE_URL "https://simdjson.org/"
|
||||
LANGUAGES CXX C
|
||||
@@ -95,6 +95,21 @@ if(
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
# GCC and Clang have horrendous Debug builds when using SIMD.
|
||||
# A common fix is to use '-Og' instead.
|
||||
# bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412
|
||||
if(
|
||||
(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR
|
||||
CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
AND CMAKE_BUILD_TYPE STREQUAL "Debug"
|
||||
)
|
||||
simdjson_add_props(
|
||||
target_compile_options PRIVATE
|
||||
-Og
|
||||
)
|
||||
endif()
|
||||
|
||||
if(SIMDJSON_ENABLE_THREADS)
|
||||
find_package(Threads REQUIRED)
|
||||
simdjson_add_props(target_link_libraries PUBLIC Threads::Threads)
|
||||
|
||||
@@ -38,7 +38,7 @@ PROJECT_NAME = simdjson
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER = "3.1.4"
|
||||
PROJECT_NUMBER = "3.1.5"
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#define SIMDJSON_SIMDJSON_VERSION_H
|
||||
|
||||
/** The version of simdjson being used (major.minor.revision) */
|
||||
#define SIMDJSON_VERSION "3.1.4"
|
||||
#define SIMDJSON_VERSION "3.1.5"
|
||||
|
||||
namespace simdjson {
|
||||
enum {
|
||||
@@ -19,7 +19,7 @@ enum {
|
||||
/**
|
||||
* The revision (major.minor.REVISION) of simdjson being used.
|
||||
*/
|
||||
SIMDJSON_VERSION_REVISION = 4
|
||||
SIMDJSON_VERSION_REVISION = 5
|
||||
};
|
||||
} // namespace simdjson
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* auto-generated on 2023-03-09 10:42:23 -0500. Do not edit! */
|
||||
/* auto-generated on 2023-03-09 11:14:42 -0500. Do not edit! */
|
||||
/* begin file src/simdjson.cpp */
|
||||
#include "simdjson.h"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* auto-generated on 2023-03-09 10:42:23 -0500. Do not edit! */
|
||||
/* auto-generated on 2023-03-09 11:14:42 -0500. Do not edit! */
|
||||
/* begin file include/simdjson.h */
|
||||
#ifndef SIMDJSON_H
|
||||
#define SIMDJSON_H
|
||||
@@ -43,7 +43,7 @@
|
||||
#define SIMDJSON_SIMDJSON_VERSION_H
|
||||
|
||||
/** The version of simdjson being used (major.minor.revision) */
|
||||
#define SIMDJSON_VERSION "3.1.4"
|
||||
#define SIMDJSON_VERSION "3.1.5"
|
||||
|
||||
namespace simdjson {
|
||||
enum {
|
||||
@@ -58,7 +58,7 @@ enum {
|
||||
/**
|
||||
* The revision (major.minor.REVISION) of simdjson being used.
|
||||
*/
|
||||
SIMDJSON_VERSION_REVISION = 4
|
||||
SIMDJSON_VERSION_REVISION = 5
|
||||
};
|
||||
} // namespace simdjson
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ bool tester(int seed, size_t volume) {
|
||||
std::vector<char> buffer(1024); // large buffer (can't overflow)
|
||||
simdjson::dom::parser parser;
|
||||
RandomEngine rand(seed);
|
||||
double result;
|
||||
double result{};
|
||||
for (size_t i = 0; i < volume; i++) {
|
||||
if((i%100000) == 0) { std::cout << "."; std::cout.flush(); }
|
||||
size_t length = build_random_string(rand, buffer.data());
|
||||
|
||||
+2
-2
@@ -123,7 +123,7 @@ void recurse(simdjson::dom::element element, stat_t &s, size_t depth) {
|
||||
if (element.is<int64_t>()) {
|
||||
s.integer_count++; // because an int can be sometimes represented as a double, we
|
||||
// to check whether it is an integer first!!!
|
||||
int64_t v;
|
||||
int64_t v{};
|
||||
error = element.get(v);
|
||||
SIMDJSON_ASSUME(!error);
|
||||
if((v >= std::numeric_limits<int32_t>::min()) and (v <= std::numeric_limits<int32_t>::max()) ) {
|
||||
@@ -138,7 +138,7 @@ void recurse(simdjson::dom::element element, stat_t &s, size_t depth) {
|
||||
} else if (element.is<double>()) {
|
||||
s.float_count++;
|
||||
} else if (element.is<bool>()) {
|
||||
bool v;
|
||||
bool v{};
|
||||
error = element.get(v);
|
||||
SIMDJSON_ASSUME(!error);
|
||||
if (v) {
|
||||
|
||||
Reference in New Issue
Block a user