Skip to content

Centralise most OS-specific logic in a lang/system module - #2999

Closed
jviotti wants to merge 4 commits into
mainfrom
system-module
Closed

jviotti wants to merge 4 commits into
mainfrom
system-module

Conversation

@jviotti

@jviotti jviotti commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

View guided diff

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@augmentcode

augmentcode Bot commented Oct 11, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Centralises most OS-specific primitives in a single lang/system module.

  • Combines process spawning, resource usage, parallel execution, and stack traces.
  • Moves file mapping, temporary directories, atomic operations, and disk flushing from I/O.
  • Adds `system.h` and dedicated `system_*` headers.
  • Updates moved declarations to use the system library's export macro.
  • Consolidates exceptions and removes the `IO` prefix from moved filesystem errors.
  • Keeps higher-level stream, binary, and path utilities in `lang/io`.
  • Makes I/O publicly depend on the new system module.
  • Updates router, benchmark, testing, and packaging consumers and dependency wiring.
  • Regroups existing tests under `test/system`, retaining stacktrace sanitizer exclusions.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found and verified against the latest diff

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/lang/io/CMakeLists.txt">

<violation number="1" location="src/lang/io/CMakeLists.txt:11">
P2: This links io unconditionally to the system target, but `SOURCEMETA_CORE_LANG_IO` and `SOURCEMETA_CORE_LANG_SYSTEM` are independent `option()`s (CMakeLists.txt lines 8 and 14). With `-DSOURCEMETA_CORE_LANG_SYSTEM=OFF`, `sourcemeta::core::system` is never created, so `target_link_libraries(sourcemeta_core_io ... sourcemeta::core::system)` makes configuration fail even though io no longer hard-depends on system at runtime after this refactor. Make io require system (for example a `cmake_dependent_option` or an `if(NOT SOURCEMETA_CORE_LANG_SYSTEM)` fatal error), or guard the link with `if(TARGET sourcemeta::core::system)` so the standalone-io configuration keeps working.</violation>
</file>

<file name="CMakeLists.txt">

<violation number="1" location="CMakeLists.txt:108">
P2: This adds the system test suite even when `SOURCEMETA_CORE_LANG_IO=OFF`, but `test/system/CMakeLists.txt` unconditionally links `sourcemeta::core::io`, so that selective test build fails at CMake generation. Gate this suite on IO too, or make its I/O-dependent tests optional.</violation>
</file>

<file name="test/system/CMakeLists.txt">

<violation number="1" location="test/system/CMakeLists.txt:54">
P2: This `_no_debug` target still inherits CMake’s Debug-configuration `/Zi` and `/DEBUG` flags, so Debug builds can produce a PDB and miss the no-PDB case this test is meant to cover. Disable debug information for this target in Debug configurations.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread config.cmake.in

# The public interface of this module exposes the operating system primitives it
# is built on, such as the memory-mapped file a binary reader reads from
target_link_libraries(sourcemeta_core_io PUBLIC sourcemeta::core::system)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This links io unconditionally to the system target, but SOURCEMETA_CORE_LANG_IO and SOURCEMETA_CORE_LANG_SYSTEM are independent option()s (CMakeLists.txt lines 8 and 14). With -DSOURCEMETA_CORE_LANG_SYSTEM=OFF, sourcemeta::core::system is never created, so target_link_libraries(sourcemeta_core_io ... sourcemeta::core::system) makes configuration fail even though io no longer hard-depends on system at runtime after this refactor. Make io require system (for example a cmake_dependent_option or an if(NOT SOURCEMETA_CORE_LANG_SYSTEM) fatal error), or guard the link with if(TARGET sourcemeta::core::system) so the standalone-io configuration keeps working.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/lang/io/CMakeLists.txt, line 11:

<comment>This links io unconditionally to the system target, but `SOURCEMETA_CORE_LANG_IO` and `SOURCEMETA_CORE_LANG_SYSTEM` are independent `option()`s (CMakeLists.txt lines 8 and 14). With `-DSOURCEMETA_CORE_LANG_SYSTEM=OFF`, `sourcemeta::core::system` is never created, so `target_link_libraries(sourcemeta_core_io ... sourcemeta::core::system)` makes configuration fail even though io no longer hard-depends on system at runtime after this refactor. Make io require system (for example a `cmake_dependent_option` or an `if(NOT SOURCEMETA_CORE_LANG_SYSTEM)` fatal error), or guard the link with `if(TARGET sourcemeta::core::system)` so the standalone-io configuration keeps working.</comment>

<file context>
@@ -1,7 +1,11 @@
+
+# The public interface of this module exposes the operating system primitives it
+# is built on, such as the memory-mapped file a binary reader reads from
+target_link_libraries(sourcemeta_core_io PUBLIC sourcemeta::core::system)
</file context>
Suggested change
target_link_libraries(sourcemeta_core_io PUBLIC sourcemeta::core::system)
if(TARGET sourcemeta::core::system)
target_link_libraries(sourcemeta_core_io PUBLIC sourcemeta::core::system)
endif()

Comment thread src/lang/system/flush.cc Outdated
Comment thread CMakeLists.txt
find_package(PCRE2 REQUIRED)
endif()
if(SOURCEMETA_CORE_LANG_PARALLEL)
if(SOURCEMETA_CORE_LANG_SYSTEM)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This adds the system test suite even when SOURCEMETA_CORE_LANG_IO=OFF, but test/system/CMakeLists.txt unconditionally links sourcemeta::core::io, so that selective test build fails at CMake generation. Gate this suite on IO too, or make its I/O-dependent tests optional.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At CMakeLists.txt, line 108:

<comment>This adds the system test suite even when `SOURCEMETA_CORE_LANG_IO=OFF`, but `test/system/CMakeLists.txt` unconditionally links `sourcemeta::core::io`, so that selective test build fails at CMake generation. Gate this suite on IO too, or make its I/O-dependent tests optional.</comment>

<file context>
@@ -107,7 +105,7 @@ if(SOURCEMETA_CORE_REGEX)
   find_package(PCRE2 REQUIRED)
 endif()
-if(SOURCEMETA_CORE_LANG_PARALLEL)
+if(SOURCEMETA_CORE_LANG_SYSTEM)
   find_package(Threads REQUIRED)
 endif()
</file context>
Suggested change
if(SOURCEMETA_CORE_LANG_SYSTEM)
if(SOURCEMETA_CORE_LANG_SYSTEM AND SOURCEMETA_CORE_LANG_IO)

Comment thread src/lang/system/flush.cc Outdated
macro(add_stacktrace_test_unix scenario debug_flag)
if(UNIX)
set(target sourcemeta_core_system_unit_stacktrace_${scenario}_main_${debug_flag})
add_executable(${target} system_stacktrace_${scenario}_main.cc)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This _no_debug target still inherits CMake’s Debug-configuration /Zi and /DEBUG flags, so Debug builds can produce a PDB and miss the no-PDB case this test is meant to cover. Disable debug information for this target in Debug configurations.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At test/system/CMakeLists.txt, line 54:

<comment>This `_no_debug` target still inherits CMake’s Debug-configuration `/Zi` and `/DEBUG` flags, so Debug builds can produce a PDB and miss the no-PDB case this test is meant to cover. Disable debug information for this target in Debug configurations.</comment>

<file context>
@@ -0,0 +1,147 @@
+macro(add_stacktrace_test_unix scenario debug_flag)
+  if(UNIX)
+    set(target sourcemeta_core_system_unit_stacktrace_${scenario}_main_${debug_flag})
+    add_executable(${target} system_stacktrace_${scenario}_main.cc)
+    target_link_libraries(${target} PRIVATE sourcemeta::core::system)
+    # These programs set their own diagnostics and their own visibility, so
</file context>

Comment thread src/lang/system/flush.cc Outdated
Comment thread src/lang/system/include/sourcemeta/core/system_error.h Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 existing issues remain and 2 new issues found across 96 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/lang/system/flush.cc">

<violation number="1" location="src/lang/system/flush.cc:48">
P2: `O_RDWR` rejects readable, read-only files with `EACCES`, although POSIX `fsync` works on an `O_RDONLY` descriptor; open read-only so flushing does not require write permission.</violation>
</file>

<file name="src/lang/io/CMakeLists.txt">

<violation number="1" location="src/lang/io/CMakeLists.txt:11">
P1: This link references `sourcemeta::core::system` before CMake creates that target: the top-level build adds `src/lang/io` before `src/lang/system`. Reorder the subdirectories or otherwise ensure the system target exists before this link is processed; configuration currently fails.</violation>
</file>

Requires human review: Auto-approval blocked because this review re-detected 5 unresolved issues already reported by Cubic.

View guided diff | Re-trigger cubic


# The public interface of this module exposes the operating system primitives it
# is built on, such as the memory-mapped file a binary reader reads from
target_link_libraries(sourcemeta_core_io PUBLIC sourcemeta::core::system)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: This link references sourcemeta::core::system before CMake creates that target: the top-level build adds src/lang/io before src/lang/system. Reorder the subdirectories or otherwise ensure the system target exists before this link is processed; configuration currently fails.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/lang/io/CMakeLists.txt, line 11:

<comment>This link references `sourcemeta::core::system` before CMake creates that target: the top-level build adds `src/lang/io` before `src/lang/system`. Reorder the subdirectories or otherwise ensure the system target exists before this link is processed; configuration currently fails.</comment>

<file context>
@@ -1,7 +1,11 @@
+
+# The public interface of this module exposes the operating system primitives it
+# is built on, such as the memory-mapped file a binary reader reads from
+target_link_libraries(sourcemeta_core_io PUBLIC sourcemeta::core::system)
</file context>

Comment thread src/lang/system/flush.cc Outdated
CloseHandle(hFile);

#else
auto descriptor = ::open(path.c_str(), O_RDWR);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: O_RDWR rejects readable, read-only files with EACCES, although POSIX fsync works on an O_RDONLY descriptor; open read-only so flushing does not require write permission.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/lang/system/flush.cc, line 48:

<comment>`O_RDWR` rejects readable, read-only files with `EACCES`, although POSIX `fsync` works on an `O_RDONLY` descriptor; open read-only so flushing does not require write permission.</comment>

<file context>
@@ -0,0 +1,88 @@
+  CloseHandle(hFile);
+
+#else
+  auto descriptor = ::open(path.c_str(), O_RDWR);
+  if (descriptor == -1) {
+    const auto error_code = std::error_code{errno, std::generic_category()};
</file context>
Suggested change
auto descriptor = ::open(path.c_str(), O_RDWR);
auto descriptor = ::open(path.c_str(), O_RDONLY);

Comment thread test/system/CMakeLists.txt
Comment thread src/lang/system/CMakeLists.txt
Comment thread src/lang/system/include/sourcemeta/core/system_stacktrace.h Outdated
@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Benchmark linux/llvm

Measured against main at d6d6d93.

7 slower, 9 faster, 96 within 5%.

Benchmark main This branch Change
Regex_Caret_Period_Asterisk_Dollar 2.18 ns 3.11 ns +42.6%
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.49 ns 3.42 ns +37.5%
Regex_Caret_Group_Period_Plus_Group_Dollar 2.49 ns 2.80 ns +12.5%
JSON_PropertySet_Insert 569.42 ns 633.57 ns +11.3%
Regex_Caret_Period_Plus_Dollar 2.80 ns 3.11 ns +11.1%
Regex_Period 2.80 ns 3.11 ns +10.9%
JSON_Parse_Integer 3.55 us 3.75 us +5.5%
URITemplateRouterView_Match 146.21 ns 138.81 ns -5.1%
Pointer_Tracked_Deeply_Nested 1.66 ms 1.58 ms -5.2%
URITemplateRouterView_Match_BasePath 167.94 ns 156.24 ns -7.0%
URITemplateRouter_Create 25.01 us 22.90 us -8.4%
JSON_Divisible_By_Decimal 309.15 ns 282.79 ns -8.5%
Regex_Period_Md_Dollar 29.50 ns 26.92 ns -8.8%
Schema_Frame_Many_Resources_References 119.17 ms 108.36 ms -9.1%
Regex_Nested_Backtrack 43.71 ns 38.56 ns -11.8%
Regex_Caret_Slash_Period_Asterisk 6.86 ns 5.91 ns -13.8%
All 112 benchmarks
Benchmark main This branch Change
Regex_Lower_S_Or_Upper_S_Asterisk 2.18 ns 2.18 ns -0.0%
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.18 ns 2.18 ns -0.2%
Regex_Period_Asterisk 2.18 ns 2.18 ns +0.1%
Regex_Group_Period_Asterisk_Group 2.18 ns 2.18 ns -0.1%
Regex_Period_Plus 2.80 ns 2.80 ns -0.1%
Regex_Period 2.80 ns 3.11 ns +10.9%
Regex_Caret_Period_Plus_Dollar 2.80 ns 3.11 ns +11.1%
Regex_Caret_Group_Period_Plus_Group_Dollar 2.49 ns 2.80 ns +12.5%
Regex_Caret_Period_Asterisk_Dollar 2.18 ns 3.11 ns +42.6%
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.49 ns 3.42 ns +37.5%
Regex_Caret_X_Hyphen 6.85 ns 6.85 ns -0.0%
Regex_Period_Md_Dollar 29.50 ns 26.92 ns -8.8%
Regex_Caret_Slash_Period_Asterisk 6.86 ns 5.91 ns -13.8%
Regex_Caret_Period_Range_Dollar 4.05 ns 4.04 ns -0.1%
Regex_Nested_Backtrack 43.71 ns 38.56 ns -11.8%
JSON_Array_Of_Objects_Unique 393.95 ns 393.25 ns -0.2%
JSON_Array_Of_Integers_Unique_256 5.12 us 5.08 us -0.7%
JSON_Array_Of_Strings_Unique_Colliding_256 205.59 us 205.77 us +0.1%
JSON_Parse_1 4.57 us 4.57 us -0.1%
JSON_Parse_Real 4.76 us 4.67 us -1.9%
JSON_Parse_Real_Inexact 4.12 us 4.12 us -0.2%
JSON_Parse_Decimal 7.12 us 7.20 us +1.0%
JSON_Parse_Schema_ISO_Language 3.21 ms 3.23 ms +0.3%
JSON_Parse_Integer 3.55 us 3.75 us +5.5%
JSON_Parse_String_NonSSO_Plain 3.11 us 3.04 us -2.1%
JSON_Parse_String_SSO_Plain 2.71 us 2.66 us -1.8%
JSON_Parse_String_Escape_Heavy 12.11 us 12.01 us -0.8%
JSON_Parse_Object_Short_Keys 7.57 us 7.89 us +4.2%
JSON_Parse_Object_Scalar_Properties 3.95 us 4.03 us +2.2%
JSON_Parse_Object_Array_Properties 5.32 us 5.24 us -1.5%
JSON_Parse_Object_Object_Properties 5.29 us 5.19 us -1.9%
JSON_Parse_Nested_Containers 33.51 us 34.55 us +3.1%
JSON_Fast_Hash_Helm_Chart_Lock 53.52 ns 53.54 ns +0.0%
JSON_Equality_Helm_Chart_Lock 159.15 ns 160.73 ns +1.0%
JSON_String_Equal_10 6.23 ns 6.23 ns +0.0%
JSON_String_Equal_100 6.86 ns 6.85 ns -0.1%
JSON_String_Equal_Small_By_Perfect_Hash_10 0.93 ns 0.93 ns -0.0%
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 10.58 ns 10.59 ns +0.1%
JSON_String_Fast_Hash_10 2.18 ns 2.18 ns -0.1%
JSON_String_Fast_Hash_100 2.18 ns 2.18 ns -0.1%
JSON_String_Key_Hash_10 2.18 ns 2.18 ns -0.1%
JSON_String_Key_Hash_100 6.54 ns 6.54 ns -0.0%
JSON_Object_Defines_Miss_Same_Length 3.42 ns 3.42 ns +0.0%
JSON_Object_Defines_Miss_Too_Small 2.97 ns 2.98 ns +0.6%
JSON_Object_Defines_Miss_Too_Large 2.66 ns 2.61 ns -1.8%
JSON_From_String_Copy 10.87 ns 11.04 ns +1.5%
JSON_From_String_Temporary 10.14 ns 10.27 ns +1.2%
JSON_Number_To_Double 13.41 ns 12.78 ns -4.7%
JSON_Object_At_Last_Key_8 3.82 ns 3.80 ns -0.6%
JSON_Object_At_Last_Key_32 12.32 ns 12.29 ns -0.2%
JSON_Object_At_Last_Key_128 87.41 ns 87.57 ns +0.2%
JSON_Object_At_Last_Key_512 390.38 ns 390.89 ns +0.1%
JSON_Divisible_By_Decimal 309.15 ns 282.79 ns -8.5%
JSON_PropertySet_Contains 52.96 ns 52.89 ns -0.1%
JSON_PropertySet_Filter_Object_Properties 39.85 ns 39.96 ns +0.3%
JSON_PropertySet_Insert 569.42 ns 633.57 ns +11.3%
JSON_Stringify_Schema_Web_Of_Things 62.18 us 61.10 us -1.7%
JSON_Prettify_Schema_Web_Of_Things 174.76 us 175.09 us +0.2%
Pointer_Object_Traverse 29.13 ns 29.14 ns +0.1%
Pointer_Object_Try_Traverse 30.20 ns 30.21 ns +0.1%
Pointer_Push_Back_Pointer_To_Weak_Pointer 145.74 ns 146.56 ns +0.6%
Pointer_Walker_Schema_ISO_Language 1.52 ms 1.51 ms -0.9%
Pointer_Untracked_Deeply_Nested 1.26 ms 1.26 ms -0.3%
Pointer_Tracked_Deeply_Nested 1.66 ms 1.58 ms -5.2%
Pointer_Position_Tracker_Get_Deeply_Nested 611.11 ns 601.26 ns -1.6%
Schema_Tracker_ISO_Language 4.27 ms 4.25 ms -0.5%
Schema_Tracker_ISO_Language_To_JSON 16.35 ms 16.12 ms -1.4%
Schema_Frame_WoT_References 2.07 ms 2.05 ms -0.9%
Schema_Frame_OMC_References 9.23 ms 9.19 ms -0.5%
Schema_Frame_OMC_Pointers 17.14 ms 16.93 ms -1.2%
Schema_Frame_OMC_Locations 7.93 ms 7.96 ms +0.3%
Schema_Frame_ISO_Language_Locations 41.07 ms 40.76 ms -0.8%
Schema_Frame_ISO_Language_Root 335.94 ns 322.40 ns -4.0%
Schema_Frame_KrakenD_References 15.18 ms 14.70 ms -3.1%
Schema_Frame_KrakenD_Reachable 154.36 ms 148.15 ms -4.0%
Schema_Frame_ISO_Language_Locations_To_JSON 31.31 ms 30.20 ms -3.6%
Schema_Frame_Many_Resources_References 119.17 ms 108.36 ms -9.1%
Schema_Frame_Deeply_Nested_References 10.67 ms 11.10 ms +4.0%
Schema_Format_ISO_Language 45.63 ms 45.82 ms +0.4%
Schema_Bundle_Meta_2020_12 592.92 us 593.26 us +0.1%
Schema_Bundle_Many_Remotes_With_Fragments 6.54 ms 6.56 ms +0.3%
OpenAPI_Frame_GSMTasks_3_0 154.95 ms 158.54 ms +2.3%
OpenAPI_Format_Synthetic_3_1 49.55 ms 51.26 ms +3.5%
JSONPath_Descendant_Filter_Nested 1.86 us 1.77 us -4.7%
URITemplateRouter_Create 25.01 us 22.90 us -8.4%
URITemplateRouter_Match 177.32 ns 175.82 ns -0.8%
URITemplateRouterView_Restore 8.38 us 8.60 us +2.5%
URITemplateRouterView_Match 146.21 ns 138.81 ns -5.1%
URITemplateRouterView_Arguments 430.76 ns 430.62 ns -0.0%
URITemplateRouter_Match_BasePath 200.66 ns 197.60 ns -1.5%
URITemplateRouterView_Match_BasePath 167.94 ns 156.24 ns -7.0%
JSONL_Parse_Large 9.16 ms 9.35 ms +2.1%
JSONL_Parse_Large_GZIP 9.29 ms 9.55 ms +2.8%
JSONLD_Catalog_Annotation_List_Populate 611.10 us 612.71 us +0.3%
JSONLD_Catalog_Materialize 3.52 ms 3.52 ms +0.0%
HTML_Build_Table_100000 37.11 ms 37.34 ms +0.6%
HTML_Render_Table_100000 1.78 ms 1.79 ms +0.7%
Markdown_To_HTML_Realistic_Document 4.15 ms 4.11 ms -0.9%
Markdown_To_HTML_Pathological 12.94 ms 13.03 ms +0.7%
Markdown_To_HTML_Short_Descriptions 595.21 ns 577.59 ns -3.0%
GZIP_Compress_ISO_Language_Set_3_Locations 37.60 ms 37.44 ms -0.4%
GZIP_Decompress_ISO_Language_Set_3_Locations 5.11 ms 5.14 ms +0.5%
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations 7.09 ms 7.09 ms +0.1%
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations 8.76 ms 8.95 ms +2.1%
GZIP_Compress_ISO_Language_Set_3_Schema 2.24 ms 2.20 ms -1.6%
GZIP_Decompress_ISO_Language_Set_3_Schema 425.27 us 428.54 us +0.8%
JOSE_VerifySignature_RS256 48.19 us 47.03 us -2.4%
JOSE_VerifySignature_ES512 1.73 ms 1.74 ms +0.5%
Crypto_CRC32_Large_JSONL 101.87 us 101.56 us -0.3%
Crypto_AES_GCM_Encrypt_128_1KB 32.40 us 31.36 us -3.2%
Crypto_AES_GCM_Decrypt_128_1KB 32.38 us 31.35 us -3.2%
Crypto_AES_GCM_Encrypt_256_1KB 39.14 us 38.12 us -2.6%

@github-actions

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Benchmark linux/gcc

Measured against main at d6d6d93.

10 slower, 32 faster, 70 within 5%.

Benchmark main This branch Change
JSON_Object_Defines_Miss_Too_Large 1.38 ns 1.68 ns +22.1%
JSON_PropertySet_Filter_Object_Properties 16.99 ns 19.92 ns +17.3%
JSON_Object_Defines_Miss_Same_Length 1.44 ns 1.64 ns +13.5%
Regex_Caret_Slash_Period_Asterisk 3.33 ns 3.77 ns +13.2%
JSON_PropertySet_Contains 20.38 ns 23.00 ns +12.9%
JSON_From_String_Copy 4.52 ns 5.05 ns +11.7%
Markdown_To_HTML_Realistic_Document 2.51 ms 2.71 ms +7.9%
JSON_String_Equal_100 3.03 ns 3.22 ns +6.1%
JOSE_VerifySignature_RS256 14.02 us 14.82 us +5.7%
Markdown_To_HTML_Short_Descriptions 322.08 ns 339.92 ns +5.5%
Schema_Frame_OMC_Pointers 10.58 ms 10.02 ms -5.2%
Pointer_Object_Try_Traverse 15.51 ns 14.68 ns -5.3%
JSON_Parse_Object_Object_Properties 3.68 us 3.48 us -5.4%
JSON_String_Equal_10 2.68 ns 2.53 ns -5.5%
HTML_Build_Table_100000 19.45 ms 18.37 ms -5.6%
Regex_Period_Md_Dollar 13.85 ns 13.07 ns -5.6%
URITemplateRouterView_Match_BasePath 76.90 ns 72.39 ns -5.9%
Schema_Bundle_Meta_2020_12 318.01 us 298.82 us -6.0%
Schema_Tracker_ISO_Language_To_JSON 8.13 ms 7.63 ms -6.2%
URITemplateRouter_Match 72.16 ns 67.65 ns -6.2%
Schema_Frame_ISO_Language_Root 174.51 ns 163.41 ns -6.4%
Pointer_Object_Traverse 13.78 ns 12.90 ns -6.4%
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations 5.19 ms 4.84 ms -6.6%
Schema_Frame_OMC_Locations 4.83 ms 4.50 ms -6.7%
JSON_Parse_Integer 2.66 us 2.47 us -6.8%
Pointer_Push_Back_Pointer_To_Weak_Pointer 66.53 ns 61.93 ns -6.9%
JSON_Array_Of_Objects_Unique 227.37 ns 211.13 ns -7.1%
Schema_Bundle_Many_Remotes_With_Fragments 3.89 ms 3.60 ms -7.3%
Regex_Group_Period_Asterisk_Group 1.26 ns 1.15 ns -8.3%
Schema_Tracker_ISO_Language 2.87 ms 2.62 ms -8.8%
Regex_Caret_Group_Period_Plus_Group_Dollar 1.24 ns 1.13 ns -9.3%
Schema_Frame_Many_Resources_References 74.35 ms 66.08 ms -11.1%
OpenAPI_Frame_GSMTasks_3_0 95.92 ms 85.10 ms -11.3%
Schema_Frame_ISO_Language_Locations_To_JSON 23.15 ms 20.46 ms -11.6%
OpenAPI_Format_Synthetic_3_1 30.65 ms 26.77 ms -12.7%
Schema_Frame_KrakenD_Reachable 79.58 ms 69.21 ms -13.0%
Schema_Frame_Deeply_Nested_References 5.83 ms 5.06 ms -13.2%
Schema_Format_ISO_Language 31.69 ms 27.25 ms -14.0%
Schema_Frame_KrakenD_References 9.79 ms 8.36 ms -14.6%
JSON_Fast_Hash_Helm_Chart_Lock 39.52 ns 33.53 ns -15.2%
Schema_Frame_ISO_Language_Locations 27.13 ms 21.02 ms -22.5%
JSON_Object_Defines_Miss_Too_Small 1.84 ns 1.42 ns -22.6%
All 112 benchmarks
Benchmark main This branch Change
Crypto_CRC32_Large_JSONL 76.54 us 75.88 us -0.9%
Crypto_AES_GCM_Encrypt_128_1KB 638.60 ns 634.35 ns -0.7%
Crypto_AES_GCM_Decrypt_128_1KB 647.67 ns 648.47 ns +0.1%
Crypto_AES_GCM_Encrypt_256_1KB 637.77 ns 664.51 ns +4.2%
JOSE_VerifySignature_RS256 14.02 us 14.82 us +5.7%
JOSE_VerifySignature_ES512 309.30 us 318.46 us +3.0%
GZIP_Compress_ISO_Language_Set_3_Locations 17.97 ms 18.75 ms +4.3%
GZIP_Decompress_ISO_Language_Set_3_Locations 3.59 ms 3.50 ms -2.4%
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations 4.39 ms 4.37 ms -0.5%
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations 5.19 ms 4.84 ms -6.6%
GZIP_Compress_ISO_Language_Set_3_Schema 1.40 ms 1.44 ms +2.9%
GZIP_Decompress_ISO_Language_Set_3_Schema 303.56 us 293.37 us -3.4%
Markdown_To_HTML_Realistic_Document 2.51 ms 2.71 ms +7.9%
Markdown_To_HTML_Pathological 7.71 ms 7.36 ms -4.5%
Markdown_To_HTML_Short_Descriptions 322.08 ns 339.92 ns +5.5%
HTML_Build_Table_100000 19.45 ms 18.37 ms -5.6%
HTML_Render_Table_100000 1.58 ms 1.54 ms -2.7%
JSONLD_Catalog_Annotation_List_Populate 396.87 us 386.93 us -2.5%
JSONLD_Catalog_Materialize 1.89 ms 1.84 ms -2.6%
JSONL_Parse_Large 6.03 ms 5.82 ms -3.5%
JSONL_Parse_Large_GZIP 5.99 ms 5.82 ms -2.8%
URITemplateRouter_Create 10.16 us 9.70 us -4.5%
URITemplateRouter_Match 72.16 ns 67.65 ns -6.2%
URITemplateRouterView_Restore 7.15 us 6.93 us -3.1%
URITemplateRouterView_Match 69.11 ns 67.55 ns -2.2%
URITemplateRouterView_Arguments 303.80 ns 298.97 ns -1.6%
URITemplateRouter_Match_BasePath 79.39 ns 76.85 ns -3.2%
URITemplateRouterView_Match_BasePath 76.90 ns 72.39 ns -5.9%
JSONPath_Descendant_Filter_Nested 1.11 us 1.07 us -3.6%
OpenAPI_Frame_GSMTasks_3_0 95.92 ms 85.10 ms -11.3%
OpenAPI_Format_Synthetic_3_1 30.65 ms 26.77 ms -12.7%
Schema_Frame_WoT_References 1.28 ms 1.27 ms -0.9%
Schema_Frame_OMC_References 5.60 ms 5.51 ms -1.5%
Schema_Frame_OMC_Pointers 10.58 ms 10.02 ms -5.2%
Schema_Frame_OMC_Locations 4.83 ms 4.50 ms -6.7%
Schema_Frame_ISO_Language_Locations 27.13 ms 21.02 ms -22.5%
Schema_Frame_ISO_Language_Root 174.51 ns 163.41 ns -6.4%
Schema_Frame_KrakenD_References 9.79 ms 8.36 ms -14.6%
Schema_Frame_KrakenD_Reachable 79.58 ms 69.21 ms -13.0%
Schema_Frame_ISO_Language_Locations_To_JSON 23.15 ms 20.46 ms -11.6%
Schema_Frame_Many_Resources_References 74.35 ms 66.08 ms -11.1%
Schema_Frame_Deeply_Nested_References 5.83 ms 5.06 ms -13.2%
Schema_Format_ISO_Language 31.69 ms 27.25 ms -14.0%
Schema_Bundle_Meta_2020_12 318.01 us 298.82 us -6.0%
Schema_Bundle_Many_Remotes_With_Fragments 3.89 ms 3.60 ms -7.3%
Pointer_Object_Traverse 13.78 ns 12.90 ns -6.4%
Pointer_Object_Try_Traverse 15.51 ns 14.68 ns -5.3%
Pointer_Push_Back_Pointer_To_Weak_Pointer 66.53 ns 61.93 ns -6.9%
Pointer_Walker_Schema_ISO_Language 803.40 us 783.85 us -2.4%
Pointer_Untracked_Deeply_Nested 835.89 us 824.80 us -1.3%
Pointer_Tracked_Deeply_Nested 1.07 ms 1.07 ms +0.1%
Pointer_Position_Tracker_Get_Deeply_Nested 391.60 ns 391.94 ns +0.1%
Schema_Tracker_ISO_Language 2.87 ms 2.62 ms -8.8%
Schema_Tracker_ISO_Language_To_JSON 8.13 ms 7.63 ms -6.2%
JSON_Array_Of_Objects_Unique 227.37 ns 211.13 ns -7.1%
JSON_Array_Of_Integers_Unique_256 2.44 us 2.43 us -0.5%
JSON_Array_Of_Strings_Unique_Colliding_256 95.39 us 98.42 us +3.2%
JSON_Parse_1 2.82 us 2.88 us +2.3%
JSON_Parse_Real 2.82 us 2.71 us -4.0%
JSON_Parse_Real_Inexact 3.11 us 3.24 us +4.1%
JSON_Parse_Decimal 5.11 us 5.22 us +2.1%
JSON_Parse_Schema_ISO_Language 2.04 ms 1.95 ms -4.2%
JSON_Parse_Integer 2.66 us 2.47 us -6.8%
JSON_Parse_String_NonSSO_Plain 2.04 us 1.97 us -3.5%
JSON_Parse_String_SSO_Plain 1.55 us 1.56 us +0.5%
JSON_Parse_String_Escape_Heavy 9.20 us 9.36 us +1.7%
JSON_Parse_Object_Short_Keys 5.78 us 5.73 us -0.8%
JSON_Parse_Object_Scalar_Properties 2.90 us 2.87 us -1.0%
JSON_Parse_Object_Array_Properties 3.52 us 3.49 us -0.8%
JSON_Parse_Object_Object_Properties 3.68 us 3.48 us -5.4%
JSON_Parse_Nested_Containers 22.76 us 22.61 us -0.7%
JSON_Fast_Hash_Helm_Chart_Lock 39.52 ns 33.53 ns -15.2%
JSON_Equality_Helm_Chart_Lock 84.87 ns 82.62 ns -2.6%
JSON_String_Equal_10 2.68 ns 2.53 ns -5.5%
JSON_String_Equal_100 3.03 ns 3.22 ns +6.1%
JSON_String_Equal_Small_By_Perfect_Hash_10 0.46 ns 0.46 ns -0.1%
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 7.24 ns 7.13 ns -1.5%
JSON_String_Fast_Hash_10 2.16 ns 2.13 ns -1.4%
JSON_String_Fast_Hash_100 2.22 ns 2.13 ns -4.0%
JSON_String_Key_Hash_10 1.15 ns 1.19 ns +3.4%
JSON_String_Key_Hash_100 7.71 ns 7.49 ns -2.8%
JSON_Object_Defines_Miss_Same_Length 1.44 ns 1.64 ns +13.5%
JSON_Object_Defines_Miss_Too_Small 1.84 ns 1.42 ns -22.6%
JSON_Object_Defines_Miss_Too_Large 1.38 ns 1.68 ns +22.1%
JSON_From_String_Copy 4.52 ns 5.05 ns +11.7%
JSON_From_String_Temporary 4.22 ns 4.29 ns +1.8%
JSON_Number_To_Double 15.48 ns 15.10 ns -2.4%
JSON_Object_At_Last_Key_8 2.20 ns 2.11 ns -3.9%
JSON_Object_At_Last_Key_32 8.04 ns 7.74 ns -3.6%
JSON_Object_At_Last_Key_128 29.82 ns 29.84 ns +0.1%
JSON_Object_At_Last_Key_512 124.54 ns 129.97 ns +4.4%
JSON_Divisible_By_Decimal 214.97 ns 220.84 ns +2.7%
JSON_PropertySet_Contains 20.38 ns 23.00 ns +12.9%
JSON_PropertySet_Filter_Object_Properties 16.99 ns 19.92 ns +17.3%
JSON_PropertySet_Insert 243.87 ns 242.13 ns -0.7%
JSON_Stringify_Schema_Web_Of_Things 31.61 us 31.39 us -0.7%
JSON_Prettify_Schema_Web_Of_Things 89.74 us 86.85 us -3.2%
Regex_Lower_S_Or_Upper_S_Asterisk 1.18 ns 1.13 ns -4.3%
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.16 ns 1.19 ns +1.8%
Regex_Period_Asterisk 1.24 ns 1.19 ns -4.2%
Regex_Group_Period_Asterisk_Group 1.26 ns 1.15 ns -8.3%
Regex_Period_Plus 1.20 ns 1.14 ns -4.9%
Regex_Period 1.18 ns 1.21 ns +2.0%
Regex_Caret_Period_Plus_Dollar 1.20 ns 1.18 ns -1.7%
Regex_Caret_Group_Period_Plus_Group_Dollar 1.24 ns 1.13 ns -9.3%
Regex_Caret_Period_Asterisk_Dollar 1.18 ns 1.13 ns -4.0%
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.20 ns 1.19 ns -0.7%
Regex_Caret_X_Hyphen 3.42 ns 3.26 ns -4.8%
Regex_Period_Md_Dollar 13.85 ns 13.07 ns -5.6%
Regex_Caret_Slash_Period_Asterisk 3.33 ns 3.77 ns +13.2%
Regex_Caret_Period_Range_Dollar 1.21 ns 1.26 ns +4.6%
Regex_Nested_Backtrack 19.34 ns 19.64 ns +1.5%

@github-actions

Copy link
Copy Markdown

Benchmark macos/llvm

Measured against main at d6d6d93.

9 slower, 87 faster, 16 within 5%.

Benchmark main This branch Change
JSON_PropertySet_Insert 343.41 ns 404.45 ns +17.8%
Regex_Lower_S_Or_Upper_S_Asterisk 1.94 ns 2.22 ns +14.1%
JSON_Parse_Real_Inexact 3.41 us 3.77 us +10.8%
JSON_Parse_String_Escape_Heavy 17.33 us 19.18 us +10.7%
JSON_Array_Of_Integers_Unique_256 5.55 us 6.12 us +10.2%
JSON_Parse_String_NonSSO_Plain 3.62 us 3.91 us +8.1%
JSON_String_Equal_100 7.52 ns 8.10 ns +7.8%
JSON_Parse_Integer 3.14 us 3.37 us +7.4%
JSON_String_Equal_10 7.32 ns 7.81 ns +6.7%
Regex_Period_Md_Dollar 23.88 ns 22.64 ns -5.2%
JSON_Parse_1 3.55 us 3.36 us -5.3%
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.09 ns 1.98 ns -5.4%
Regex_Caret_Period_Asterisk_Dollar 2.11 ns 1.99 ns -5.5%
Schema_Frame_Deeply_Nested_References 13.08 ms 12.35 ms -5.6%
JSON_Parse_String_SSO_Plain 1.98 us 1.86 us -6.0%
GZIP_Compress_ISO_Language_Set_3_Locations 33.64 ms 31.32 ms -6.9%
URITemplateRouterView_Arguments 621.18 ns 577.11 ns -7.1%
URITemplateRouter_Match 194.44 ns 179.93 ns -7.5%
JSON_Array_Of_Objects_Unique 459.50 ns 425.04 ns -7.5%
JSON_Parse_Schema_ISO_Language 2.67 ms 2.46 ms -7.5%
OpenAPI_Format_Synthetic_3_1 48.15 ms 44.52 ms -7.6%
JSON_Object_Defines_Miss_Too_Small 3.77 ns 3.48 ns -7.7%
Schema_Format_ISO_Language 28.07 ms 25.90 ms -7.7%
Schema_Frame_OMC_Locations 9.20 ms 8.42 ms -8.5%
JSON_Parse_Decimal 6.38 us 5.82 us -8.7%
GZIP_Compress_ISO_Language_Set_3_Schema 1.93 ms 1.75 ms -9.3%
JSON_String_Key_Hash_10 2.03 ns 1.83 ns -9.6%
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 3.89 ns 3.51 ns -9.7%
JSON_Object_At_Last_Key_128 63.34 ns 56.67 ns -10.5%
Regex_Period_Asterisk 2.08 ns 1.86 ns -10.5%
JSON_String_Fast_Hash_10 2.54 ns 2.26 ns -10.7%
JSON_Fast_Hash_Helm_Chart_Lock 72.68 ns 64.75 ns -10.9%
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.31 ns 2.05 ns -11.2%
Schema_Frame_ISO_Language_Locations_To_JSON 25.75 ms 22.85 ms -11.3%
Schema_Frame_KrakenD_References 17.21 ms 15.23 ms -11.5%
Schema_Frame_Many_Resources_References 101.00 ms 89.06 ms -11.8%
URITemplateRouterView_Match 147.28 ns 129.82 ns -11.9%
JSON_Object_At_Last_Key_512 251.40 ns 220.78 ns -12.2%
JSON_PropertySet_Filter_Object_Properties 47.16 ns 41.29 ns -12.5%
Regex_Caret_X_Hyphen 7.80 ns 6.82 ns -12.5%
Crypto_CRC32_Large_JSONL 24.53 us 21.42 us -12.7%
Schema_Bundle_Meta_2020_12 506.10 us 440.40 us -13.0%
JSON_Parse_Object_Short_Keys 7.02 us 6.04 us -13.9%
Regex_Period 2.38 ns 2.04 ns -14.6%
Regex_Caret_Group_Period_Plus_Group_Dollar 2.37 ns 2.01 ns -15.2%
URITemplateRouterView_Match_BasePath 183.32 ns 155.09 ns -15.4%
Markdown_To_HTML_Realistic_Document 4.08 ms 3.45 ms -15.5%
JSON_Number_To_Double 13.01 ns 10.91 ns -16.1%
Pointer_Position_Tracker_Get_Deeply_Nested 494.18 ns 413.26 ns -16.4%
JSON_String_Fast_Hash_100 2.51 ns 2.09 ns -16.9%
JSON_Divisible_By_Decimal 334.60 ns 277.85 ns -17.0%
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations 6.99 ms 5.79 ms -17.2%
JSON_Stringify_Schema_Web_Of_Things 93.50 us 76.40 us -18.3%
Pointer_Object_Traverse 27.57 ns 22.14 ns -19.7%
JSON_Object_Defines_Miss_Too_Large 3.51 ns 2.81 ns -19.9%
JSON_Prettify_Schema_Web_Of_Things 263.92 us 210.43 us -20.3%
JOSE_VerifySignature_RS256 29.44 us 23.33 us -20.8%
Regex_Caret_Period_Plus_Dollar 2.38 ns 1.88 ns -20.9%
Schema_Frame_OMC_Pointers 22.07 ms 17.44 ms -21.0%
Crypto_AES_GCM_Encrypt_256_1KB 5.16 us 4.07 us -21.2%
GZIP_Decompress_ISO_Language_Set_3_Locations 4.05 ms 3.19 ms -21.3%
JSON_Array_Of_Strings_Unique_Colliding_256 198.22 us 155.01 us -21.8%
JSONL_Parse_Large_GZIP 8.15 ms 6.32 ms -22.4%
JSONL_Parse_Large 8.52 ms 6.56 ms -23.0%
JSON_Parse_Object_Scalar_Properties 4.21 us 3.23 us -23.3%
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations 6.02 ms 4.57 ms -24.2%
JOSE_VerifySignature_ES512 1.36 ms 1.03 ms -24.2%
Regex_Nested_Backtrack 40.83 ns 30.89 ns -24.3%
JSON_Object_At_Last_Key_32 16.94 ns 12.78 ns -24.5%
Crypto_AES_GCM_Encrypt_128_1KB 4.62 us 3.49 us -24.6%
Schema_Frame_ISO_Language_Root 168.86 ns 127.30 ns -24.6%
Schema_Frame_OMC_References 12.68 ms 9.54 ms -24.7%
JSON_Object_At_Last_Key_8 5.55 ns 4.12 ns -25.7%
Schema_Frame_WoT_References 2.89 ms 2.14 ms -26.1%
JSON_Parse_Object_Array_Properties 5.00 us 3.68 us -26.4%
Pointer_Object_Try_Traverse 51.58 ns 37.48 ns -27.3%
GZIP_Decompress_ISO_Language_Set_3_Schema 432.87 us 314.53 us -27.3%
JSON_String_Key_Hash_100 3.16 ns 2.29 ns -27.5%
Schema_Tracker_ISO_Language_To_JSON 17.19 ms 12.44 ms -27.6%
URITemplateRouter_Match_BasePath 295.42 ns 212.69 ns -28.0%
HTML_Build_Table_100000 38.84 ms 27.21 ms -29.9%
Regex_Caret_Period_Range_Dollar 3.26 ns 2.26 ns -30.5%
JSONLD_Catalog_Materialize 3.29 ms 2.27 ms -30.9%
JSON_PropertySet_Contains 66.45 ns 45.84 ns -31.0%
Crypto_AES_GCM_Decrypt_128_1KB 5.50 us 3.79 us -31.1%
JSONLD_Catalog_Annotation_List_Populate 765.06 us 519.73 us -32.1%
Pointer_Untracked_Deeply_Nested 1.45 ms 982.05 us -32.3%
Schema_Tracker_ISO_Language 5.08 ms 3.37 ms -33.7%
Pointer_Walker_Schema_ISO_Language 2.19 ms 1.42 ms -34.9%
URITemplateRouterView_Restore 16.98 us 10.88 us -35.9%
Markdown_To_HTML_Short_Descriptions 528.00 ns 337.43 ns -36.1%
JSON_From_String_Copy 19.60 ns 12.48 ns -36.3%
Pointer_Tracked_Deeply_Nested 1.96 ms 1.25 ms -36.5%
Pointer_Push_Back_Pointer_To_Weak_Pointer 252.52 ns 151.03 ns -40.2%
Schema_Frame_ISO_Language_Locations 38.56 ms 22.69 ms -41.2%
JSON_From_String_Temporary 13.99 ns 6.67 ns -52.3%
All 112 benchmarks
Benchmark main This branch Change
Regex_Lower_S_Or_Upper_S_Asterisk 1.94 ns 2.22 ns +14.1%
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.09 ns 1.98 ns -5.4%
Regex_Period_Asterisk 2.08 ns 1.86 ns -10.5%
Regex_Group_Period_Asterisk_Group 2.08 ns 2.02 ns -3.0%
Regex_Period_Plus 2.05 ns 2.10 ns +2.5%
Regex_Period 2.38 ns 2.04 ns -14.6%
Regex_Caret_Period_Plus_Dollar 2.38 ns 1.88 ns -20.9%
Regex_Caret_Group_Period_Plus_Group_Dollar 2.37 ns 2.01 ns -15.2%
Regex_Caret_Period_Asterisk_Dollar 2.11 ns 1.99 ns -5.5%
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.31 ns 2.05 ns -11.2%
Regex_Caret_X_Hyphen 7.80 ns 6.82 ns -12.5%
Regex_Period_Md_Dollar 23.88 ns 22.64 ns -5.2%
Regex_Caret_Slash_Period_Asterisk 5.84 ns 5.59 ns -4.2%
Regex_Caret_Period_Range_Dollar 3.26 ns 2.26 ns -30.5%
Regex_Nested_Backtrack 40.83 ns 30.89 ns -24.3%
JSON_Array_Of_Objects_Unique 459.50 ns 425.04 ns -7.5%
JSON_Array_Of_Integers_Unique_256 5.55 us 6.12 us +10.2%
JSON_Array_Of_Strings_Unique_Colliding_256 198.22 us 155.01 us -21.8%
JSON_Parse_1 3.55 us 3.36 us -5.3%
JSON_Parse_Real 3.57 us 3.73 us +4.5%
JSON_Parse_Real_Inexact 3.41 us 3.77 us +10.8%
JSON_Parse_Decimal 6.38 us 5.82 us -8.7%
JSON_Parse_Schema_ISO_Language 2.67 ms 2.46 ms -7.5%
JSON_Parse_Integer 3.14 us 3.37 us +7.4%
JSON_Parse_String_NonSSO_Plain 3.62 us 3.91 us +8.1%
JSON_Parse_String_SSO_Plain 1.98 us 1.86 us -6.0%
JSON_Parse_String_Escape_Heavy 17.33 us 19.18 us +10.7%
JSON_Parse_Object_Short_Keys 7.02 us 6.04 us -13.9%
JSON_Parse_Object_Scalar_Properties 4.21 us 3.23 us -23.3%
JSON_Parse_Object_Array_Properties 5.00 us 3.68 us -26.4%
JSON_Parse_Object_Object_Properties 4.21 us 4.29 us +1.8%
JSON_Parse_Nested_Containers 29.22 us 29.07 us -0.5%
JSON_Fast_Hash_Helm_Chart_Lock 72.68 ns 64.75 ns -10.9%
JSON_Equality_Helm_Chart_Lock 189.42 ns 191.29 ns +1.0%
JSON_String_Equal_10 7.32 ns 7.81 ns +6.7%
JSON_String_Equal_100 7.52 ns 8.10 ns +7.8%
JSON_String_Equal_Small_By_Perfect_Hash_10 0.39 ns 0.39 ns -0.3%
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 3.89 ns 3.51 ns -9.7%
JSON_String_Fast_Hash_10 2.54 ns 2.26 ns -10.7%
JSON_String_Fast_Hash_100 2.51 ns 2.09 ns -16.9%
JSON_String_Key_Hash_10 2.03 ns 1.83 ns -9.6%
JSON_String_Key_Hash_100 3.16 ns 2.29 ns -27.5%
JSON_Object_Defines_Miss_Same_Length 3.32 ns 3.33 ns +0.1%
JSON_Object_Defines_Miss_Too_Small 3.77 ns 3.48 ns -7.7%
JSON_Object_Defines_Miss_Too_Large 3.51 ns 2.81 ns -19.9%
JSON_From_String_Copy 19.60 ns 12.48 ns -36.3%
JSON_From_String_Temporary 13.99 ns 6.67 ns -52.3%
JSON_Number_To_Double 13.01 ns 10.91 ns -16.1%
JSON_Object_At_Last_Key_8 5.55 ns 4.12 ns -25.7%
JSON_Object_At_Last_Key_32 16.94 ns 12.78 ns -24.5%
JSON_Object_At_Last_Key_128 63.34 ns 56.67 ns -10.5%
JSON_Object_At_Last_Key_512 251.40 ns 220.78 ns -12.2%
JSON_Divisible_By_Decimal 334.60 ns 277.85 ns -17.0%
JSON_PropertySet_Contains 66.45 ns 45.84 ns -31.0%
JSON_PropertySet_Filter_Object_Properties 47.16 ns 41.29 ns -12.5%
JSON_PropertySet_Insert 343.41 ns 404.45 ns +17.8%
JSON_Stringify_Schema_Web_Of_Things 93.50 us 76.40 us -18.3%
JSON_Prettify_Schema_Web_Of_Things 263.92 us 210.43 us -20.3%
Pointer_Object_Traverse 27.57 ns 22.14 ns -19.7%
Pointer_Object_Try_Traverse 51.58 ns 37.48 ns -27.3%
Pointer_Push_Back_Pointer_To_Weak_Pointer 252.52 ns 151.03 ns -40.2%
Pointer_Walker_Schema_ISO_Language 2.19 ms 1.42 ms -34.9%
Pointer_Untracked_Deeply_Nested 1.45 ms 982.05 us -32.3%
Pointer_Tracked_Deeply_Nested 1.96 ms 1.25 ms -36.5%
Pointer_Position_Tracker_Get_Deeply_Nested 494.18 ns 413.26 ns -16.4%
Schema_Tracker_ISO_Language 5.08 ms 3.37 ms -33.7%
Schema_Tracker_ISO_Language_To_JSON 17.19 ms 12.44 ms -27.6%
Schema_Frame_WoT_References 2.89 ms 2.14 ms -26.1%
Schema_Frame_OMC_References 12.68 ms 9.54 ms -24.7%
Schema_Frame_OMC_Pointers 22.07 ms 17.44 ms -21.0%
Schema_Frame_OMC_Locations 9.20 ms 8.42 ms -8.5%
Schema_Frame_ISO_Language_Locations 38.56 ms 22.69 ms -41.2%
Schema_Frame_ISO_Language_Root 168.86 ns 127.30 ns -24.6%
Schema_Frame_KrakenD_References 17.21 ms 15.23 ms -11.5%
Schema_Frame_KrakenD_Reachable 189.69 ms 188.25 ms -0.8%
Schema_Frame_ISO_Language_Locations_To_JSON 25.75 ms 22.85 ms -11.3%
Schema_Frame_Many_Resources_References 101.00 ms 89.06 ms -11.8%
Schema_Frame_Deeply_Nested_References 13.08 ms 12.35 ms -5.6%
Schema_Format_ISO_Language 28.07 ms 25.90 ms -7.7%
Schema_Bundle_Meta_2020_12 506.10 us 440.40 us -13.0%
Schema_Bundle_Many_Remotes_With_Fragments 5.60 ms 5.65 ms +0.8%
OpenAPI_Frame_GSMTasks_3_0 150.40 ms 143.21 ms -4.8%
OpenAPI_Format_Synthetic_3_1 48.15 ms 44.52 ms -7.6%
JSONPath_Descendant_Filter_Nested 1.45 us 1.52 us +4.3%
URITemplateRouter_Create 19.59 us 19.23 us -1.8%
URITemplateRouter_Match 194.44 ns 179.93 ns -7.5%
URITemplateRouterView_Restore 16.98 us 10.88 us -35.9%
URITemplateRouterView_Match 147.28 ns 129.82 ns -11.9%
URITemplateRouterView_Arguments 621.18 ns 577.11 ns -7.1%
URITemplateRouter_Match_BasePath 295.42 ns 212.69 ns -28.0%
URITemplateRouterView_Match_BasePath 183.32 ns 155.09 ns -15.4%
JSONL_Parse_Large 8.52 ms 6.56 ms -23.0%
JSONL_Parse_Large_GZIP 8.15 ms 6.32 ms -22.4%
JSONLD_Catalog_Annotation_List_Populate 765.06 us 519.73 us -32.1%
JSONLD_Catalog_Materialize 3.29 ms 2.27 ms -30.9%
HTML_Build_Table_100000 38.84 ms 27.21 ms -29.9%
HTML_Render_Table_100000 2.04 ms 1.97 ms -3.8%
Markdown_To_HTML_Realistic_Document 4.08 ms 3.45 ms -15.5%
Markdown_To_HTML_Pathological 12.23 ms 11.99 ms -2.0%
Markdown_To_HTML_Short_Descriptions 528.00 ns 337.43 ns -36.1%
GZIP_Compress_ISO_Language_Set_3_Locations 33.64 ms 31.32 ms -6.9%
GZIP_Decompress_ISO_Language_Set_3_Locations 4.05 ms 3.19 ms -21.3%
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations 6.02 ms 4.57 ms -24.2%
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations 6.99 ms 5.79 ms -17.2%
GZIP_Compress_ISO_Language_Set_3_Schema 1.93 ms 1.75 ms -9.3%
GZIP_Decompress_ISO_Language_Set_3_Schema 432.87 us 314.53 us -27.3%
JOSE_VerifySignature_RS256 29.44 us 23.33 us -20.8%
JOSE_VerifySignature_ES512 1.36 ms 1.03 ms -24.2%
Crypto_CRC32_Large_JSONL 24.53 us 21.42 us -12.7%
Crypto_AES_GCM_Encrypt_128_1KB 4.62 us 3.49 us -24.6%
Crypto_AES_GCM_Decrypt_128_1KB 5.50 us 3.79 us -31.1%
Crypto_AES_GCM_Encrypt_256_1KB 5.16 us 4.07 us -21.2%

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 15 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread test/system/CMakeLists.txt Outdated
Comment thread src/lang/system/parallel.cc Outdated
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/lang/system/parallel.cc">

<violation number="1" location="src/lang/system/parallel.cc:92">
P2: The worker can delete `callable_owner.get()` before this `release()` runs, leaving the parent to release a stale pointer. Release ownership before starting the thread, then reclaim it if thread creation fails.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

throw std::runtime_error{"Could not create thread"};
}

[[maybe_unused]] const auto *released{callable_owner.release()};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The worker can delete callable_owner.get() before this release() runs, leaving the parent to release a stale pointer. Release ownership before starting the thread, then reclaim it if thread creation fails.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At src/lang/system/parallel.cc, line 92:

<comment>The worker can delete `callable_owner.get()` before this `release()` runs, leaving the parent to release a stale pointer. Release ownership before starting the thread, then reclaim it if thread creation fails.</comment>

<file context>
@@ -52,44 +78,46 @@ auto parallel_thread_start(std::function<void()> callable,
     throw std::runtime_error{"Could not create thread"};
   }
 
+  [[maybe_unused]] const auto *released{callable_owner.release()};
   return reinterpret_cast<void *>(thread);
 #else
</file context>

@jviotti jviotti closed this Oct 12, 2026
@jviotti
jviotti deleted the system-module branch October 12, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant