Compare commits

...

5 Commits

Author SHA1 Message Date
Daniel Lemire b4a0fd3ff4 4.4.2 2026-03-20 11:12:35 -04:00
Levi Zim a1ff05a5e8 Fix RISC-V compilation without RVV (#2637)
#2617 introduced an RVV check that only checks if the compiler supports RVV intrinsics without checking if RVV is enabled at compile time.

This has caused compilation failure of node.js on riscv64. Fix it by appending a check for __riscv_vector.
2026-03-20 11:11:38 -04:00
Daniel Lemire 5395aacb8b v4.4.1 2026-03-17 12:39:07 -04:00
Daniel Lemire 781ea4b495 fixing issue https://github.com/nodejs/node/pull/62257 (#2631) 2026-03-17 12:38:11 -04:00
Jaël Champagne Gareau 03e8d14eee fix failing CI and rename misleading workflow name (#2630) 2026-03-15 18:40:08 -04:00
12 changed files with 50 additions and 40 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
name: Performance check on Ubuntu 20.04 CI (GCC 9) name: Performance check on Ubuntu 24.04 CI (GCC 13)
on: on:
push: push:
+2 -2
View File
@@ -1,4 +1,4 @@
name: Ubuntu 20.04 CI (GCC 9) without exceptions name: Ubuntu 24.04 CI (GCC 13) without exceptions
on: [push, pull_request] on: [push, pull_request]
@@ -24,7 +24,7 @@ jobs:
cd .. && cd .. &&
mkdir build && mkdir build &&
cd build && cd build &&
cmake -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_EXCEPTIONS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX:PATH=destination .. && cmake -DSIMDJSON_DEVELOPER_MODE=ON -DSIMDJSON_GOOGLE_BENCHMARKS=ON -DSIMDJSON_EXCEPTIONS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX:PATH=destination .. &&
cmake --build . && cmake --build . &&
ctest --output-on-failure -LE explicitonly -j && ctest --output-on-failure -LE explicitonly -j &&
make install && make install &&
+1 -1
View File
@@ -1,4 +1,4 @@
name: Ubuntu 20.04 CI (GCC 9) Without Threads name: Ubuntu 24.04 CI (GCC 13) Without Threads
on: [push, pull_request] on: [push, pull_request]
+2 -2
View File
@@ -1,9 +1,9 @@
name: Ubuntu 20.04 CI (GCC 9) With Memory Sanitizer name: Ubuntu 24.04 CI (GCC 13) With Memory Sanitizer
on: [push, pull_request] on: [push, pull_request]
jobs: jobs:
ubuntu-build-address-sanitizier: ubuntu-build-address-sanitizer:
if: >- if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') && ! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]') ! contains(toJSON(github.event.commits.*.message), '[skip github]')
+1 -1
View File
@@ -12,7 +12,7 @@ endif()
project( project(
simdjson simdjson
# The version number is modified by tools/release.py # The version number is modified by tools/release.py
VERSION 4.4.0 VERSION 4.4.2
DESCRIPTION "Parsing gigabytes of JSON per second" DESCRIPTION "Parsing gigabytes of JSON per second"
HOMEPAGE_URL "https://simdjson.org/" HOMEPAGE_URL "https://simdjson.org/"
LANGUAGES CXX C LANGUAGES CXX C
+1 -1
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = simdjson
# could be handy for archiving the generated documentation or if some version # could be handy for archiving the generated documentation or if some version
# control system is used. # control system is used.
PROJECT_NUMBER = "4.4.0" PROJECT_NUMBER = "4.4.2"
# Using the PROJECT_BRIEF tag one can provide an optional one line description # 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 # for a project that appears at the top of each page and should give viewer a
@@ -32,12 +32,13 @@
#define SIMDJSON_EXPERIMENTAL_HAS_LSX 1 #define SIMDJSON_EXPERIMENTAL_HAS_LSX 1
#endif #endif
#endif #endif
#if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 #if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 && \
defined(__riscv_vector)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV #ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV
#define SIMDJSON_EXPERIMENTAL_HAS_RVV 1 #define SIMDJSON_EXPERIMENTAL_HAS_RVV 1
#endif #endif
#endif #endif
#if defined(__PPC64__) || defined(_M_PPC64) #if (defined(__PPC64__) || defined(_M_PPC64)) && defined(__ALTIVEC__)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64 #ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64
#define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1 #define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1
#endif #endif
+3 -3
View File
@@ -387,7 +387,7 @@ simdjson_inline padded_memory_map::padded_memory_map(const char *filename) noexc
close(fd); close(fd);
return; // failed to get file size, data will be nullptr return; // failed to get file size, data will be nullptr
} }
size = (size_t)st.st_size; size = static_cast<size_t>(st.st_size);
size_t total_size = size + simdjson::SIMDJSON_PADDING; size_t total_size = size + simdjson::SIMDJSON_PADDING;
void *anon_map = void *anon_map =
mmap(NULL, total_size, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); mmap(NULL, total_size, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
@@ -402,13 +402,13 @@ simdjson_inline padded_memory_map::padded_memory_map(const char *filename) noexc
close(fd); close(fd);
return; // failed to mmap file, data will be nullptr return; // failed to mmap file, data will be nullptr
} }
data = (const char *)file_map; data = static_cast<const char *>(file_map);
close(fd); // no longer needed after mapping close(fd); // no longer needed after mapping
} }
simdjson_inline padded_memory_map::~padded_memory_map() noexcept { simdjson_inline padded_memory_map::~padded_memory_map() noexcept {
if (data != nullptr) { if (data != nullptr) {
munmap((void *)data, size + simdjson::SIMDJSON_PADDING); munmap(const_cast<char *>(data), size + simdjson::SIMDJSON_PADDING);
} }
} }
+2 -2
View File
@@ -4,7 +4,7 @@
#define SIMDJSON_SIMDJSON_VERSION_H #define SIMDJSON_SIMDJSON_VERSION_H
/** The version of simdjson being used (major.minor.revision) */ /** The version of simdjson being used (major.minor.revision) */
#define SIMDJSON_VERSION "4.4.0" #define SIMDJSON_VERSION "4.4.2"
namespace simdjson { namespace simdjson {
enum { enum {
@@ -19,7 +19,7 @@ enum {
/** /**
* The revision (major.minor.REVISION) of simdjson being used. * The revision (major.minor.REVISION) of simdjson being used.
*/ */
SIMDJSON_VERSION_REVISION = 0 SIMDJSON_VERSION_REVISION = 2
}; };
} // namespace simdjson } // namespace simdjson
+1 -1
View File
@@ -1,4 +1,4 @@
/* auto-generated on 2026-03-12 20:40:43 -0400. version 4.4.0 Do not edit! */ /* auto-generated on 2026-03-20 11:11:38 -0400. version 4.4.2 Do not edit! */
/* including simdjson.cpp: */ /* including simdjson.cpp: */
/* begin file simdjson.cpp */ /* begin file simdjson.cpp */
#define SIMDJSON_SRC_SIMDJSON_CPP #define SIMDJSON_SRC_SIMDJSON_CPP
+33 -24
View File
@@ -1,4 +1,4 @@
/* auto-generated on 2026-03-12 20:40:43 -0400. version 4.4.0 Do not edit! */ /* auto-generated on 2026-03-20 11:11:38 -0400. version 4.4.2 Do not edit! */
/* including simdjson.h: */ /* including simdjson.h: */
/* begin file simdjson.h */ /* begin file simdjson.h */
#ifndef SIMDJSON_H #ifndef SIMDJSON_H
@@ -2538,7 +2538,7 @@ namespace std {
#define SIMDJSON_SIMDJSON_VERSION_H #define SIMDJSON_SIMDJSON_VERSION_H
/** The version of simdjson being used (major.minor.revision) */ /** The version of simdjson being used (major.minor.revision) */
#define SIMDJSON_VERSION "4.4.0" #define SIMDJSON_VERSION "4.4.2"
namespace simdjson { namespace simdjson {
enum { enum {
@@ -2553,7 +2553,7 @@ enum {
/** /**
* The revision (major.minor.REVISION) of simdjson being used. * The revision (major.minor.REVISION) of simdjson being used.
*/ */
SIMDJSON_VERSION_REVISION = 0 SIMDJSON_VERSION_REVISION = 2
}; };
} // namespace simdjson } // namespace simdjson
@@ -5059,7 +5059,7 @@ simdjson_inline padded_memory_map::padded_memory_map(const char *filename) noexc
close(fd); close(fd);
return; // failed to get file size, data will be nullptr return; // failed to get file size, data will be nullptr
} }
size = (size_t)st.st_size; size = static_cast<size_t>(st.st_size);
size_t total_size = size + simdjson::SIMDJSON_PADDING; size_t total_size = size + simdjson::SIMDJSON_PADDING;
void *anon_map = void *anon_map =
mmap(NULL, total_size, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); mmap(NULL, total_size, PROT_READ, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
@@ -5074,13 +5074,13 @@ simdjson_inline padded_memory_map::padded_memory_map(const char *filename) noexc
close(fd); close(fd);
return; // failed to mmap file, data will be nullptr return; // failed to mmap file, data will be nullptr
} }
data = (const char *)file_map; data = static_cast<const char *>(file_map);
close(fd); // no longer needed after mapping close(fd); // no longer needed after mapping
} }
simdjson_inline padded_memory_map::~padded_memory_map() noexcept { simdjson_inline padded_memory_map::~padded_memory_map() noexcept {
if (data != nullptr) { if (data != nullptr) {
munmap((void *)data, size + simdjson::SIMDJSON_PADDING); munmap(const_cast<char *>(data), size + simdjson::SIMDJSON_PADDING);
} }
} }
@@ -39744,12 +39744,13 @@ simdjson_warn_unused simdjson_result<std::string> extract_fractured_json(
#define SIMDJSON_EXPERIMENTAL_HAS_LSX 1 #define SIMDJSON_EXPERIMENTAL_HAS_LSX 1
#endif #endif
#endif #endif
#if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 #if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 && \
defined(__riscv_vector)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV #ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV
#define SIMDJSON_EXPERIMENTAL_HAS_RVV 1 #define SIMDJSON_EXPERIMENTAL_HAS_RVV 1
#endif #endif
#endif #endif
#if defined(__PPC64__) || defined(_M_PPC64) #if (defined(__PPC64__) || defined(_M_PPC64)) && defined(__ALTIVEC__)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64 #ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64
#define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1 #define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1
#endif #endif
@@ -41827,12 +41828,13 @@ simdjson_warn_unused simdjson_result<std::string> extract_fractured_json(
#define SIMDJSON_EXPERIMENTAL_HAS_LSX 1 #define SIMDJSON_EXPERIMENTAL_HAS_LSX 1
#endif #endif
#endif #endif
#if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 #if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 && \
defined(__riscv_vector)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV #ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV
#define SIMDJSON_EXPERIMENTAL_HAS_RVV 1 #define SIMDJSON_EXPERIMENTAL_HAS_RVV 1
#endif #endif
#endif #endif
#if defined(__PPC64__) || defined(_M_PPC64) #if (defined(__PPC64__) || defined(_M_PPC64)) && defined(__ALTIVEC__)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64 #ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64
#define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1 #define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1
#endif #endif
@@ -44397,12 +44399,13 @@ simdjson_warn_unused simdjson_result<std::string> extract_fractured_json(
#define SIMDJSON_EXPERIMENTAL_HAS_LSX 1 #define SIMDJSON_EXPERIMENTAL_HAS_LSX 1
#endif #endif
#endif #endif
#if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 #if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 && \
defined(__riscv_vector)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV #ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV
#define SIMDJSON_EXPERIMENTAL_HAS_RVV 1 #define SIMDJSON_EXPERIMENTAL_HAS_RVV 1
#endif #endif
#endif #endif
#if defined(__PPC64__) || defined(_M_PPC64) #if (defined(__PPC64__) || defined(_M_PPC64)) && defined(__ALTIVEC__)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64 #ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64
#define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1 #define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1
#endif #endif
@@ -46967,12 +46970,13 @@ simdjson_warn_unused simdjson_result<std::string> extract_fractured_json(
#define SIMDJSON_EXPERIMENTAL_HAS_LSX 1 #define SIMDJSON_EXPERIMENTAL_HAS_LSX 1
#endif #endif
#endif #endif
#if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 #if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 && \
defined(__riscv_vector)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV #ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV
#define SIMDJSON_EXPERIMENTAL_HAS_RVV 1 #define SIMDJSON_EXPERIMENTAL_HAS_RVV 1
#endif #endif
#endif #endif
#if defined(__PPC64__) || defined(_M_PPC64) #if (defined(__PPC64__) || defined(_M_PPC64)) && defined(__ALTIVEC__)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64 #ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64
#define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1 #define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1
#endif #endif
@@ -49652,12 +49656,13 @@ simdjson_warn_unused simdjson_result<std::string> extract_fractured_json(
#define SIMDJSON_EXPERIMENTAL_HAS_LSX 1 #define SIMDJSON_EXPERIMENTAL_HAS_LSX 1
#endif #endif
#endif #endif
#if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 #if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 && \
defined(__riscv_vector)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV #ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV
#define SIMDJSON_EXPERIMENTAL_HAS_RVV 1 #define SIMDJSON_EXPERIMENTAL_HAS_RVV 1
#endif #endif
#endif #endif
#if defined(__PPC64__) || defined(_M_PPC64) #if (defined(__PPC64__) || defined(_M_PPC64)) && defined(__ALTIVEC__)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64 #ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64
#define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1 #define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1
#endif #endif
@@ -52654,12 +52659,13 @@ simdjson_warn_unused simdjson_result<std::string> extract_fractured_json(
#define SIMDJSON_EXPERIMENTAL_HAS_LSX 1 #define SIMDJSON_EXPERIMENTAL_HAS_LSX 1
#endif #endif
#endif #endif
#if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 #if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 && \
defined(__riscv_vector)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV #ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV
#define SIMDJSON_EXPERIMENTAL_HAS_RVV 1 #define SIMDJSON_EXPERIMENTAL_HAS_RVV 1
#endif #endif
#endif #endif
#if defined(__PPC64__) || defined(_M_PPC64) #if (defined(__PPC64__) || defined(_M_PPC64)) && defined(__ALTIVEC__)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64 #ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64
#define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1 #define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1
#endif #endif
@@ -55130,12 +55136,13 @@ simdjson_warn_unused simdjson_result<std::string> extract_fractured_json(
#define SIMDJSON_EXPERIMENTAL_HAS_LSX 1 #define SIMDJSON_EXPERIMENTAL_HAS_LSX 1
#endif #endif
#endif #endif
#if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 #if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 && \
defined(__riscv_vector)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV #ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV
#define SIMDJSON_EXPERIMENTAL_HAS_RVV 1 #define SIMDJSON_EXPERIMENTAL_HAS_RVV 1
#endif #endif
#endif #endif
#if defined(__PPC64__) || defined(_M_PPC64) #if (defined(__PPC64__) || defined(_M_PPC64)) && defined(__ALTIVEC__)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64 #ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64
#define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1 #define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1
#endif #endif
@@ -57629,12 +57636,13 @@ simdjson_warn_unused simdjson_result<std::string> extract_fractured_json(
#define SIMDJSON_EXPERIMENTAL_HAS_LSX 1 #define SIMDJSON_EXPERIMENTAL_HAS_LSX 1
#endif #endif
#endif #endif
#if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 #if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 && \
defined(__riscv_vector)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV #ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV
#define SIMDJSON_EXPERIMENTAL_HAS_RVV 1 #define SIMDJSON_EXPERIMENTAL_HAS_RVV 1
#endif #endif
#endif #endif
#if defined(__PPC64__) || defined(_M_PPC64) #if (defined(__PPC64__) || defined(_M_PPC64)) && defined(__ALTIVEC__)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64 #ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64
#define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1 #define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1
#endif #endif
@@ -60132,12 +60140,13 @@ simdjson_warn_unused simdjson_result<std::string> extract_fractured_json(
#define SIMDJSON_EXPERIMENTAL_HAS_LSX 1 #define SIMDJSON_EXPERIMENTAL_HAS_LSX 1
#endif #endif
#endif #endif
#if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 #if defined(__riscv_v_intrinsic) && __riscv_v_intrinsic >= 11000 && \
defined(__riscv_vector)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV #ifndef SIMDJSON_EXPERIMENTAL_HAS_RVV
#define SIMDJSON_EXPERIMENTAL_HAS_RVV 1 #define SIMDJSON_EXPERIMENTAL_HAS_RVV 1
#endif #endif
#endif #endif
#if defined(__PPC64__) || defined(_M_PPC64) #if (defined(__PPC64__) || defined(_M_PPC64)) && defined(__ALTIVEC__)
#ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64 #ifndef SIMDJSON_EXPERIMENTAL_HAS_PPC64
#define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1 #define SIMDJSON_EXPERIMENTAL_HAS_PPC64 1
#endif #endif
Binary file not shown.