Repository navigation
Port the Metapack module into this project - #3028
Conversation
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
🤖 Augment PR SummaryPorts Metapack into Core to expose file metadata without decoding payloads. 🤖 Was this summary useful? React with 👍 or 👎 |
|
|
||
| try { | ||
| auto decompressed{ | ||
| gunzip(parsed.payload.data(), parsed.payload.size(), content_bytes)}; |
There was a problem hiding this comment.
Could you check the decompression bound at src/extra/metapack/metapack_read.cc:45? gunzip's third argument is only an output-size hint, so a forged small content_bytes passes the ratio guard but can still inflate up to the unrelated 256 MiB default limit before the mismatch is rejected, bypassing the caller's decompression budget.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| return try_parse_json(decompressed.value()); | ||
| } | ||
|
|
||
| if (parsed.header->content_bytes > parsed.payload.size()) { |
There was a problem hiding this comment.
Could you check the understated-size case at src/extra/metapack/metapack_read.cc:125? An identity payload of 12345 with content_bytes changed to 1 passes this check and returns JSON 1, silently accepting a different value instead of rejecting the size mismatch as the GZIP path does.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| if (parsed.header->content_bytes / parsed.payload.size() > | ||
| maximum_decompression_ratio) { |
There was a problem hiding this comment.
At src/extra/metapack/metapack_read.cc:31-32, integer division rounds the expansion ratio down, so 150 decoded bytes in a 100-byte payload pass with maximum_decompression_ratio = 1. Could you check this boundary, since over-limit documents are accepted even with a truthful header?
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
4 issues found across 21 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="config.cmake.in">
<violation number="1" location="config.cmake.in:48">
P1: This unconditional default component breaks `find_package(Core)` for installations built with `SOURCEMETA_CORE_EXTRA_METAPACK=OFF`, because no `sourcemeta_core_metapack.cmake` is installed in that configuration. Guard the default component with `SOURCEMETA_CORE_EXTRA_METAPACK`.</violation>
</file>
<file name="CMakeLists.txt">
<violation number="1" location="CMakeLists.txt:323">
P2: Disabling this option produces an unusable installed package: the generated package config still requires the `metapack` component, but this branch does not generate its export file. Make the package component conditional on this option, or otherwise reject this configuration.</violation>
</file>
<file name="src/extra/metapack/metapack_write.cc">
<violation number="1" location="src/extra/metapack/metapack_write.cc:44">
P2: These metadata lengths are only guarded by debug assertions, then truncated by the casts in release builds. Validate and reject oversized media types or extensions before serializing the header.</violation>
</file>
<file name="src/extra/metapack/include/sourcemeta/core/metapack_format.h">
<violation number="1" location="src/extra/metapack/include/sourcemeta/core/metapack_format.h:47">
P2: `metapack_read_json` never validates this stored digest, so a modified payload that still parses as JSON is accepted with stale integrity metadata. Compare the SHA-256 of the decoded contents with `header->checksum` before returning the document.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
| list(APPEND SOURCEMETA_CORE_COMPONENTS markdown) | ||
| list(APPEND SOURCEMETA_CORE_COMPONENTS diff) | ||
| list(APPEND SOURCEMETA_CORE_COMPONENTS terminal) | ||
| list(APPEND SOURCEMETA_CORE_COMPONENTS metapack) |
There was a problem hiding this comment.
P1: This unconditional default component breaks find_package(Core) for installations built with SOURCEMETA_CORE_EXTRA_METAPACK=OFF, because no sourcemeta_core_metapack.cmake is installed in that configuration. Guard the default component with SOURCEMETA_CORE_EXTRA_METAPACK.
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 config.cmake.in, line 48:
<comment>This unconditional default component breaks `find_package(Core)` for installations built with `SOURCEMETA_CORE_EXTRA_METAPACK=OFF`, because no `sourcemeta_core_metapack.cmake` is installed in that configuration. Guard the default component with `SOURCEMETA_CORE_EXTRA_METAPACK`.</comment>
<file context>
@@ -45,6 +45,7 @@ if(NOT SOURCEMETA_CORE_COMPONENTS)
list(APPEND SOURCEMETA_CORE_COMPONENTS markdown)
list(APPEND SOURCEMETA_CORE_COMPONENTS diff)
list(APPEND SOURCEMETA_CORE_COMPONENTS terminal)
+ list(APPEND SOURCEMETA_CORE_COMPONENTS metapack)
list(APPEND SOURCEMETA_CORE_COMPONENTS error)
list(APPEND SOURCEMETA_CORE_COMPONENTS options)
</file context>
| list(APPEND SOURCEMETA_CORE_COMPONENTS metapack) | |
| if(@SOURCEMETA_CORE_EXTRA_METAPACK@) | |
| list(APPEND SOURCEMETA_CORE_COMPONENTS metapack) | |
| endif() |
| add_subdirectory(src/core/terminal) | ||
| endif() | ||
|
|
||
| if(SOURCEMETA_CORE_EXTRA_METAPACK) |
There was a problem hiding this comment.
P2: Disabling this option produces an unusable installed package: the generated package config still requires the metapack component, but this branch does not generate its export file. Make the package component conditional on this option, or otherwise reject this configuration.
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 323:
<comment>Disabling this option produces an unusable installed package: the generated package config still requires the `metapack` component, but this branch does not generate its export file. Make the package component conditional on this option, or otherwise reject this configuration.</comment>
<file context>
@@ -319,6 +320,10 @@ if(SOURCEMETA_CORE_TERMINAL)
add_subdirectory(src/core/terminal)
endif()
+if(SOURCEMETA_CORE_EXTRA_METAPACK)
+ add_subdirectory(src/extra/metapack)
+endif()
</file context>
| .count(); | ||
| header.content_bytes = contents.size(); | ||
| header.checksum = sha256_digest(contents); | ||
| header.media_type_length = static_cast<std::uint16_t>(media_type.size()); |
There was a problem hiding this comment.
P2: These metadata lengths are only guarded by debug assertions, then truncated by the casts in release builds. Validate and reject oversized media types or extensions before serializing the header.
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/extra/metapack/metapack_write.cc, line 44:
<comment>These metadata lengths are only guarded by debug assertions, then truncated by the casts in release builds. Validate and reject oversized media types or extensions before serializing the header.</comment>
<file context>
@@ -0,0 +1,148 @@
+ .count();
+ header.content_bytes = contents.size();
+ header.checksum = sha256_digest(contents);
+ header.media_type_length = static_cast<std::uint16_t>(media_type.size());
+
+ // NOLINTNEXTLINE(cppcoreguidelines-pro-type-reinterpret-cast)
</file context>
| /// How many bytes the contents take once decoded | ||
| std::uint64_t content_bytes{0}; | ||
| /// The SHA-256 digest of the decoded contents | ||
| std::array<std::uint8_t, 32> checksum{}; |
There was a problem hiding this comment.
P2: metapack_read_json never validates this stored digest, so a modified payload that still parses as JSON is accepted with stale integrity metadata. Compare the SHA-256 of the decoded contents with header->checksum before returning the document.
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/extra/metapack/include/sourcemeta/core/metapack_format.h, line 47:
<comment>`metapack_read_json` never validates this stored digest, so a modified payload that still parses as JSON is accepted with stale integrity metadata. Compare the SHA-256 of the decoded contents with `header->checksum` before returning the document.</comment>
<file context>
@@ -0,0 +1,79 @@
+ /// How many bytes the contents take once decoded
+ std::uint64_t content_bytes{0};
+ /// The SHA-256 digest of the decoded contents
+ std::array<std::uint8_t, 32> checksum{};
+ /// How many bytes the media type that follows the header takes
+ std::uint16_t media_type_length{0};
</file context>
Benchmark
|
| Benchmark | main |
This branch | Change |
|---|---|---|---|
Regex_Caret_Slash_Period_Asterisk |
6.22 ns | 7.47 ns | +20.0% |
JSON_String_Equal_10 |
5.61 ns | 6.54 ns | +16.7% |
JSON_String_Equal_100 |
6.23 ns | 7.17 ns | +15.1% |
JSON_String_Fast_Hash_10 |
2.18 ns | 2.49 ns | +14.4% |
JSON_String_Fast_Hash_100 |
2.18 ns | 2.49 ns | +14.3% |
Regex_Caret_Period_Plus_Dollar |
2.18 ns | 2.49 ns | +14.2% |
JSON_Fast_Hash_Helm_Chart_Lock |
53.52 ns | 61.03 ns | +14.0% |
Regex_Period |
2.49 ns | 2.80 ns | +12.6% |
JSON_Prettify_KrakenD |
2.05 ms | 2.28 ms | +11.2% |
JSON_Parse_Real |
4.39 us | 4.66 us | +6.1% |
JSON_Parse_Real_Inexact |
4.07 us | 4.31 us | +6.0% |
Pointer_Tracked_Deeply_Nested |
1.59 ms | 1.68 ms | +5.5% |
Metapack_Parse_OMC_JSON_V2 |
n/a | 6.85 ns | new |
Metapack_Read_OMC_JSON_V2 |
n/a | 369.20 us | new |
Metapack_Write_OMC_JSON_V2 |
n/a | 1.08 ms | new |
Markdown_To_HTML_Pathological |
13.81 ms | 12.94 ms | -6.3% |
JSON_PropertySet_Insert |
582.92 ns | 534.11 ns | -8.4% |
JSON_Array_Of_Integers_Unique_256 |
5.10 us | 4.66 us | -8.7% |
Pointer_Object_Try_Traverse |
33.62 ns | 30.18 ns | -10.2% |
All 118 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.0% |
Regex_Period_Asterisk |
2.18 ns | 2.18 ns | -0.0% |
Regex_Group_Period_Asterisk_Group |
2.18 ns | 2.18 ns | +0.1% |
Regex_Period_Plus |
2.67 ns | 2.80 ns | +4.9% |
Regex_Period |
2.49 ns | 2.80 ns | +12.6% |
Regex_Caret_Period_Plus_Dollar |
2.18 ns | 2.49 ns | +14.2% |
Regex_Caret_Group_Period_Plus_Group_Dollar |
2.18 ns | 2.18 ns | -0.2% |
Regex_Caret_Period_Asterisk_Dollar |
2.49 ns | 2.49 ns | +0.0% |
Regex_Caret_Group_Period_Asterisk_Group_Dollar |
2.49 ns | 2.49 ns | -0.0% |
Regex_Caret_X_Hyphen |
6.54 ns | 6.54 ns | -0.0% |
Regex_Period_Md_Dollar |
27.31 ns | 26.65 ns | -2.4% |
Regex_Caret_Slash_Period_Asterisk |
6.22 ns | 7.47 ns | +20.0% |
Regex_Caret_Period_Range_Dollar |
4.36 ns | 4.36 ns | +0.0% |
Regex_Nested_Backtrack |
38.52 ns | 37.90 ns | -1.6% |
JSON_Array_Of_Objects_Unique |
388.61 ns | 402.61 ns | +3.6% |
JSON_Array_Of_Integers_Unique_256 |
5.10 us | 4.66 us | -8.7% |
JSON_Array_Of_Strings_Unique_Colliding_256 |
208.67 us | 215.90 us | +3.5% |
JSON_Parse_1 |
4.58 us | 4.47 us | -2.5% |
JSON_Parse_Real |
4.39 us | 4.66 us | +6.1% |
JSON_Parse_Real_Inexact |
4.07 us | 4.31 us | +6.0% |
JSON_Parse_Decimal |
7.41 us | 7.62 us | +2.8% |
JSON_Parse_Schema_ISO_Language |
3.36 ms | 3.34 ms | -0.7% |
JSON_Parse_KrakenD |
1.10 ms | 1.10 ms | -0.1% |
JSON_Stringify_ISO_Language |
2.49 ms | 2.61 ms | +4.7% |
JSON_Prettify_KrakenD |
2.05 ms | 2.28 ms | +11.2% |
JSON_Parse_Integer |
3.66 us | 3.69 us | +0.8% |
JSON_Parse_String_NonSSO_Plain |
3.41 us | 3.40 us | -0.3% |
JSON_Parse_String_SSO_Plain |
3.01 us | 2.96 us | -1.6% |
JSON_Parse_String_Escape_Heavy |
12.50 us | 12.42 us | -0.6% |
JSON_Parse_Object_Short_Keys |
8.06 us | 7.94 us | -1.5% |
JSON_Parse_Object_Scalar_Properties |
4.09 us | 4.03 us | -1.5% |
JSON_Parse_Object_Array_Properties |
5.49 us | 5.37 us | -2.0% |
JSON_Parse_Object_Object_Properties |
5.44 us | 5.41 us | -0.6% |
JSON_Parse_Nested_Containers |
34.19 us | 33.99 us | -0.6% |
JSON_Fast_Hash_Helm_Chart_Lock |
53.52 ns | 61.03 ns | +14.0% |
JSON_Equality_Helm_Chart_Lock |
160.84 ns | 161.78 ns | +0.6% |
JSON_String_Equal_10 |
5.61 ns | 6.54 ns | +16.7% |
JSON_String_Equal_100 |
6.23 ns | 7.17 ns | +15.1% |
JSON_String_Equal_Small_By_Perfect_Hash_10 |
0.94 ns | 0.94 ns | -0.1% |
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 |
10.58 ns | 10.58 ns | +0.0% |
JSON_String_Fast_Hash_10 |
2.18 ns | 2.49 ns | +14.4% |
JSON_String_Fast_Hash_100 |
2.18 ns | 2.49 ns | +14.3% |
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 |
2.96 ns | 2.96 ns | +0.1% |
JSON_Object_Defines_Miss_Too_Small |
3.42 ns | 3.42 ns | -0.1% |
JSON_Object_Defines_Miss_Too_Large |
2.73 ns | 2.77 ns | +1.7% |
JSON_From_String_Copy |
10.73 ns | 10.48 ns | -2.3% |
JSON_From_String_Temporary |
9.76 ns | 9.90 ns | +1.4% |
JSON_Number_To_Double |
12.79 ns | 13.40 ns | +4.8% |
JSON_Object_At_Last_Key_8 |
5.85 ns | 5.81 ns | -0.8% |
JSON_Object_At_Last_Key_32 |
12.29 ns | 12.32 ns | +0.3% |
JSON_Object_At_Last_Key_128 |
48.61 ns | 48.58 ns | -0.1% |
JSON_Object_At_Last_Key_512 |
382.07 ns | 384.23 ns | +0.6% |
JSON_Divisible_By_Decimal |
291.89 ns | 287.02 ns | -1.7% |
JSON_PropertySet_Contains |
50.55 ns | 50.63 ns | +0.2% |
JSON_PropertySet_Filter_Object_Properties |
51.25 ns | 51.19 ns | -0.1% |
JSON_PropertySet_Insert |
582.92 ns | 534.11 ns | -8.4% |
JSON_Stringify_Schema_Web_Of_Things |
61.62 us | 64.61 us | +4.9% |
JSON_Prettify_Schema_Web_Of_Things |
173.71 us | 180.21 us | +3.7% |
Pointer_Object_Traverse |
28.48 ns | 28.96 ns | +1.7% |
Pointer_Object_Try_Traverse |
33.62 ns | 30.18 ns | -10.2% |
Pointer_Push_Back_Pointer_To_Weak_Pointer |
145.18 ns | 145.39 ns | +0.1% |
Pointer_Walker_Schema_ISO_Language |
1.54 ms | 1.50 ms | -2.3% |
Pointer_Untracked_Deeply_Nested |
1.24 ms | 1.23 ms | -1.1% |
Pointer_Tracked_Deeply_Nested |
1.59 ms | 1.68 ms | +5.5% |
Pointer_Position_Tracker_Get_Deeply_Nested |
601.10 ns | 582.47 ns | -3.1% |
Schema_Tracker_ISO_Language |
4.40 ms | 4.40 ms | +0.2% |
Schema_Tracker_ISO_Language_To_JSON |
16.34 ms | 16.70 ms | +2.2% |
Schema_Frame_WoT_References |
2.07 ms | 2.04 ms | -1.8% |
Schema_Frame_OMC_References |
9.28 ms | 9.20 ms | -0.9% |
Schema_Frame_OMC_Pointers |
17.34 ms | 17.16 ms | -1.0% |
Schema_Frame_OMC_Locations |
7.95 ms | 7.95 ms | +0.0% |
Schema_Frame_ISO_Language_Locations |
42.01 ms | 43.31 ms | +3.1% |
Schema_Frame_ISO_Language_Root |
317.01 ns | 314.42 ns | -0.8% |
Schema_Frame_KrakenD_References |
15.46 ms | 15.42 ms | -0.2% |
Schema_Frame_KrakenD_Reachable |
152.67 ms | 148.94 ms | -2.4% |
Schema_Frame_ISO_Language_Locations_To_JSON |
31.20 ms | 30.97 ms | -0.7% |
Schema_Frame_Many_Resources_References |
112.43 ms | 111.18 ms | -1.1% |
Schema_Frame_Deeply_Nested_References |
11.15 ms | 10.94 ms | -1.9% |
Schema_Format_ISO_Language |
47.77 ms | 48.30 ms | +1.1% |
Schema_Bundle_Meta_2020_12 |
617.25 us | 614.35 us | -0.5% |
Schema_Bundle_Many_Remotes_With_Fragments |
6.57 ms | 6.49 ms | -1.2% |
OpenAPI_Frame_GSMTasks_3_0 |
161.12 ms | 159.33 ms | -1.1% |
OpenAPI_Format_Synthetic_3_1 |
51.01 ms | 51.67 ms | +1.3% |
JSONPath_Descendant_Filter_Nested |
1.83 us | 1.82 us | -0.2% |
URITemplateRouter_Create |
23.23 us | 22.75 us | -2.0% |
URITemplateRouter_Match |
175.44 ns | 172.18 ns | -1.9% |
URITemplateRouterView_Restore |
8.51 us | 8.48 us | -0.4% |
URITemplateRouterView_Match |
144.17 ns | 141.27 ns | -2.0% |
URITemplateRouterView_Arguments |
433.09 ns | 442.69 ns | +2.2% |
URITemplateRouter_Match_BasePath |
200.71 ns | 192.21 ns | -4.2% |
URITemplateRouterView_Match_BasePath |
166.06 ns | 166.98 ns | +0.5% |
JSONL_Parse_Large |
9.43 ms | 9.48 ms | +0.6% |
JSONL_Parse_Large_GZIP |
9.64 ms | 9.65 ms | +0.1% |
JSONLD_Catalog_Annotation_List_Populate |
619.12 us | 613.87 us | -0.8% |
JSONLD_Catalog_Materialize |
3.57 ms | 3.57 ms | +0.1% |
HTML_Build_Table_100000 |
37.63 ms | 37.77 ms | +0.4% |
HTML_Render_Table_100000 |
1.86 ms | 1.87 ms | +0.2% |
Markdown_To_HTML_Realistic_Document |
4.14 ms | 4.09 ms | -1.3% |
Markdown_To_HTML_Pathological |
13.81 ms | 12.94 ms | -6.3% |
Markdown_To_HTML_Short_Descriptions |
572.99 ns | 573.50 ns | +0.1% |
GZIP_Compress_ISO_Language_Set_3_Locations |
37.48 ms | 37.67 ms | +0.5% |
GZIP_Decompress_ISO_Language_Set_3_Locations |
5.15 ms | 5.18 ms | +0.5% |
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations |
7.09 ms | 7.10 ms | +0.1% |
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations |
9.54 ms | 9.51 ms | -0.3% |
GZIP_Compress_ISO_Language_Set_3_Schema |
2.23 ms | 2.23 ms | +0.2% |
GZIP_Decompress_ISO_Language_Set_3_Schema |
425.59 us | 419.43 us | -1.4% |
JOSE_VerifySignature_RS256 |
48.29 us | 46.72 us | -3.3% |
JOSE_VerifySignature_ES512 |
1.74 ms | 1.74 ms | +0.3% |
Crypto_CRC32_Large_JSONL |
101.80 us | 101.79 us | -0.0% |
Crypto_AES_GCM_Encrypt_128_1KB |
32.45 us | 31.30 us | -3.5% |
Crypto_AES_GCM_Decrypt_128_1KB |
32.40 us | 31.29 us | -3.4% |
Crypto_AES_GCM_Encrypt_256_1KB |
39.19 us | 38.06 us | -2.9% |
Metapack_Parse_OMC_JSON_V2 |
n/a | 6.85 ns | new |
Metapack_Read_OMC_JSON_V2 |
n/a | 369.20 us | new |
Metapack_Write_OMC_JSON_V2 |
n/a | 1.08 ms | new |
Benchmark
|
| Benchmark | main |
This branch | Change |
|---|---|---|---|
JSON_String_Equal_10 |
4.70 ns | 5.80 ns | +23.3% |
JSON_String_Equal_100 |
5.52 ns | 6.62 ns | +19.8% |
Regex_Period_Md_Dollar |
25.74 ns | 27.61 ns | +7.2% |
JSON_Array_Of_Strings_Unique_Colliding_256 |
155.21 us | 165.51 us | +6.6% |
URITemplateRouter_Create |
15.22 us | 16.02 us | +5.2% |
Metapack_Parse_OMC_JSON_V2 |
n/a | 1.91 ns | new |
Metapack_Read_OMC_JSON_V2 |
n/a | 338.15 us | new |
Metapack_Write_OMC_JSON_V2 |
n/a | 2.72 ms | new |
HTML_Render_Table_100000 |
1.96 ms | 1.85 ms | -5.8% |
Schema_Tracker_ISO_Language_To_JSON |
12.73 ms | 11.96 ms | -6.1% |
JSON_String_Fast_Hash_100 |
2.50 ns | 2.33 ns | -6.7% |
Schema_Frame_ISO_Language_Locations_To_JSON |
30.89 ms | 28.45 ms | -7.9% |
Regex_Caret_Period_Asterisk_Dollar |
1.84 ns | 1.57 ns | -14.5% |
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar |
1.84 ns | 1.57 ns | -14.7% |
Regex_Period_Plus |
1.84 ns | 1.57 ns | -14.8% |
Regex_Caret_Group_Period_Asterisk_Group_Dollar |
1.84 ns | 1.57 ns | -14.8% |
Regex_Lower_S_Or_Upper_S_Asterisk |
1.84 ns | 1.57 ns | -14.8% |
Regex_Caret_Group_Period_Plus_Group_Dollar |
1.84 ns | 1.57 ns | -14.8% |
Regex_Group_Period_Asterisk_Group |
1.84 ns | 1.57 ns | -14.8% |
Regex_Period |
1.84 ns | 1.57 ns | -14.8% |
Regex_Period_Asterisk |
1.77 ns | 1.50 ns | -15.4% |
Regex_Caret_Period_Plus_Dollar |
1.77 ns | 1.50 ns | -15.4% |
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 |
10.93 ns | 8.94 ns | -18.2% |
JSON_String_Key_Hash_10 |
2.56 ns | 1.91 ns | -25.3% |
All 118 benchmarks
| Benchmark | main |
This branch | Change |
|---|---|---|---|
Metapack_Parse_OMC_JSON_V2 |
n/a | 1.91 ns | new |
Metapack_Read_OMC_JSON_V2 |
n/a | 338.15 us | new |
Metapack_Write_OMC_JSON_V2 |
n/a | 2.72 ms | new |
Crypto_CRC32_Large_JSONL |
88.71 us | 88.77 us | +0.1% |
Crypto_AES_GCM_Encrypt_128_1KB |
827.57 ns | 816.25 ns | -1.4% |
Crypto_AES_GCM_Decrypt_128_1KB |
807.53 ns | 819.99 ns | +1.5% |
Crypto_AES_GCM_Encrypt_256_1KB |
863.63 ns | 842.71 ns | -2.4% |
JOSE_VerifySignature_RS256 |
19.06 us | 19.07 us | +0.1% |
JOSE_VerifySignature_ES512 |
497.67 us | 497.59 us | -0.0% |
GZIP_Compress_ISO_Language_Set_3_Locations |
24.80 ms | 25.85 ms | +4.2% |
GZIP_Decompress_ISO_Language_Set_3_Locations |
4.34 ms | 4.33 ms | -0.1% |
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations |
5.85 ms | 5.84 ms | -0.2% |
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations |
7.54 ms | 7.32 ms | -2.9% |
GZIP_Compress_ISO_Language_Set_3_Schema |
1.78 ms | 1.80 ms | +0.9% |
GZIP_Decompress_ISO_Language_Set_3_Schema |
267.80 us | 269.32 us | +0.6% |
Markdown_To_HTML_Realistic_Document |
3.89 ms | 3.84 ms | -1.2% |
Markdown_To_HTML_Pathological |
10.91 ms | 10.89 ms | -0.2% |
Markdown_To_HTML_Short_Descriptions |
479.72 ns | 463.71 ns | -3.3% |
HTML_Build_Table_100000 |
29.31 ms | 29.25 ms | -0.2% |
HTML_Render_Table_100000 |
1.96 ms | 1.85 ms | -5.8% |
JSONLD_Catalog_Annotation_List_Populate |
573.79 us | 582.58 us | +1.5% |
JSONLD_Catalog_Materialize |
2.77 ms | 2.78 ms | +0.3% |
JSONL_Parse_Large |
8.18 ms | 8.10 ms | -0.9% |
JSONL_Parse_Large_GZIP |
8.29 ms | 8.24 ms | -0.7% |
URITemplateRouter_Create |
15.22 us | 16.02 us | +5.2% |
URITemplateRouter_Match |
110.28 ns | 112.22 ns | +1.8% |
URITemplateRouterView_Restore |
7.64 us | 7.51 us | -1.7% |
URITemplateRouterView_Match |
103.91 ns | 100.66 ns | -3.1% |
URITemplateRouterView_Arguments |
366.57 ns | 367.71 ns | +0.3% |
URITemplateRouter_Match_BasePath |
126.66 ns | 129.20 ns | +2.0% |
URITemplateRouterView_Match_BasePath |
120.96 ns | 117.56 ns | -2.8% |
JSONPath_Descendant_Filter_Nested |
1.51 us | 1.56 us | +3.6% |
OpenAPI_Frame_GSMTasks_3_0 |
124.98 ms | 123.76 ms | -1.0% |
OpenAPI_Format_Synthetic_3_1 |
42.09 ms | 41.26 ms | -2.0% |
Schema_Frame_WoT_References |
1.79 ms | 1.76 ms | -1.3% |
Schema_Frame_OMC_References |
8.02 ms | 8.02 ms | -0.0% |
Schema_Frame_OMC_Pointers |
15.43 ms | 15.04 ms | -2.6% |
Schema_Frame_OMC_Locations |
6.94 ms | 7.05 ms | +1.5% |
Schema_Frame_ISO_Language_Locations |
35.58 ms | 35.45 ms | -0.4% |
Schema_Frame_ISO_Language_Root |
253.52 ns | 251.41 ns | -0.8% |
Schema_Frame_KrakenD_References |
12.84 ms | 12.68 ms | -1.3% |
Schema_Frame_KrakenD_Reachable |
111.20 ms | 106.24 ms | -4.5% |
Schema_Frame_ISO_Language_Locations_To_JSON |
30.89 ms | 28.45 ms | -7.9% |
Schema_Frame_Many_Resources_References |
103.44 ms | 102.25 ms | -1.2% |
Schema_Frame_Deeply_Nested_References |
9.27 ms | 9.14 ms | -1.4% |
Schema_Format_ISO_Language |
40.46 ms | 39.42 ms | -2.6% |
Schema_Bundle_Meta_2020_12 |
486.29 us | 484.49 us | -0.4% |
Schema_Bundle_Many_Remotes_With_Fragments |
5.50 ms | 5.45 ms | -0.9% |
Pointer_Object_Traverse |
19.19 ns | 19.31 ns | +0.6% |
Pointer_Object_Try_Traverse |
20.73 ns | 20.70 ns | -0.1% |
Pointer_Push_Back_Pointer_To_Weak_Pointer |
108.43 ns | 107.42 ns | -0.9% |
Pointer_Walker_Schema_ISO_Language |
1.15 ms | 1.10 ms | -4.0% |
Pointer_Untracked_Deeply_Nested |
1.13 ms | 1.13 ms | -0.2% |
Pointer_Tracked_Deeply_Nested |
1.49 ms | 1.50 ms | +0.3% |
Pointer_Position_Tracker_Get_Deeply_Nested |
556.06 ns | 541.05 ns | -2.7% |
Schema_Tracker_ISO_Language |
3.96 ms | 3.88 ms | -2.0% |
Schema_Tracker_ISO_Language_To_JSON |
12.73 ms | 11.96 ms | -6.1% |
JSON_Array_Of_Objects_Unique |
377.01 ns | 391.69 ns | +3.9% |
JSON_Array_Of_Integers_Unique_256 |
3.32 us | 3.29 us | -0.9% |
JSON_Array_Of_Strings_Unique_Colliding_256 |
155.21 us | 165.51 us | +6.6% |
JSON_Parse_1 |
4.32 us | 4.25 us | -1.5% |
JSON_Parse_Real |
4.15 us | 4.17 us | +0.5% |
JSON_Parse_Real_Inexact |
3.79 us | 3.77 us | -0.6% |
JSON_Parse_Decimal |
6.83 us | 6.69 us | -2.0% |
JSON_Parse_Schema_ISO_Language |
2.99 ms | 2.93 ms | -2.2% |
JSON_Parse_KrakenD |
1.17 ms | 1.16 ms | -1.2% |
JSON_Stringify_ISO_Language |
2.02 ms | 2.02 ms | -0.2% |
JSON_Prettify_KrakenD |
1.59 ms | 1.58 ms | -0.7% |
JSON_Parse_Integer |
3.31 us | 3.25 us | -1.9% |
JSON_Parse_String_NonSSO_Plain |
3.19 us | 3.25 us | +1.8% |
JSON_Parse_String_SSO_Plain |
2.54 us | 2.61 us | +2.5% |
JSON_Parse_String_Escape_Heavy |
12.62 us | 12.72 us | +0.8% |
JSON_Parse_Object_Short_Keys |
8.16 us | 8.08 us | -1.1% |
JSON_Parse_Object_Scalar_Properties |
4.13 us | 4.09 us | -1.0% |
JSON_Parse_Object_Array_Properties |
5.45 us | 5.39 us | -1.0% |
JSON_Parse_Object_Object_Properties |
5.46 us | 5.42 us | -0.8% |
JSON_Parse_Nested_Containers |
33.96 us | 33.54 us | -1.2% |
JSON_Fast_Hash_Helm_Chart_Lock |
63.28 ns | 62.10 ns | -1.9% |
JSON_Equality_Helm_Chart_Lock |
144.79 ns | 148.66 ns | +2.7% |
JSON_String_Equal_10 |
4.70 ns | 5.80 ns | +23.3% |
JSON_String_Equal_100 |
5.52 ns | 6.62 ns | +19.8% |
JSON_String_Equal_Small_By_Perfect_Hash_10 |
0.55 ns | 0.55 ns | +0.6% |
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 |
10.93 ns | 8.94 ns | -18.2% |
JSON_String_Fast_Hash_10 |
2.33 ns | 2.33 ns | -0.0% |
JSON_String_Fast_Hash_100 |
2.50 ns | 2.33 ns | -6.7% |
JSON_String_Key_Hash_10 |
2.56 ns | 1.91 ns | -25.3% |
JSON_String_Key_Hash_100 |
12.26 ns | 12.27 ns | +0.0% |
JSON_Object_Defines_Miss_Same_Length |
2.45 ns | 2.45 ns | +0.1% |
JSON_Object_Defines_Miss_Too_Small |
2.45 ns | 2.45 ns | +0.0% |
JSON_Object_Defines_Miss_Too_Large |
3.00 ns | 3.01 ns | +0.5% |
JSON_From_String_Copy |
7.49 ns | 7.27 ns | -3.0% |
JSON_From_String_Temporary |
6.97 ns | 6.70 ns | -4.0% |
JSON_Number_To_Double |
19.86 ns | 19.71 ns | -0.8% |
JSON_Object_At_Last_Key_8 |
3.25 ns | 3.25 ns | +0.1% |
JSON_Object_At_Last_Key_32 |
10.24 ns | 10.27 ns | +0.3% |
JSON_Object_At_Last_Key_128 |
36.54 ns | 36.56 ns | +0.1% |
JSON_Object_At_Last_Key_512 |
158.94 ns | 156.23 ns | -1.7% |
JSON_Divisible_By_Decimal |
254.10 ns | 261.16 ns | +2.8% |
JSON_PropertySet_Contains |
40.36 ns | 40.37 ns | +0.0% |
JSON_PropertySet_Filter_Object_Properties |
29.72 ns | 29.73 ns | +0.0% |
JSON_PropertySet_Insert |
369.61 ns | 370.49 ns | +0.2% |
JSON_Stringify_Schema_Web_Of_Things |
45.02 us | 44.95 us | -0.2% |
JSON_Prettify_Schema_Web_Of_Things |
124.42 us | 125.07 us | +0.5% |
Regex_Lower_S_Or_Upper_S_Asterisk |
1.84 ns | 1.57 ns | -14.8% |
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar |
1.84 ns | 1.57 ns | -14.7% |
Regex_Period_Asterisk |
1.77 ns | 1.50 ns | -15.4% |
Regex_Group_Period_Asterisk_Group |
1.84 ns | 1.57 ns | -14.8% |
Regex_Period_Plus |
1.84 ns | 1.57 ns | -14.8% |
Regex_Period |
1.84 ns | 1.57 ns | -14.8% |
Regex_Caret_Period_Plus_Dollar |
1.77 ns | 1.50 ns | -15.4% |
Regex_Caret_Group_Period_Plus_Group_Dollar |
1.84 ns | 1.57 ns | -14.8% |
Regex_Caret_Period_Asterisk_Dollar |
1.84 ns | 1.57 ns | -14.5% |
Regex_Caret_Group_Period_Asterisk_Group_Dollar |
1.84 ns | 1.57 ns | -14.8% |
Regex_Caret_X_Hyphen |
5.25 ns | 5.25 ns | +0.1% |
Regex_Period_Md_Dollar |
25.74 ns | 27.61 ns | +7.2% |
Regex_Caret_Slash_Period_Asterisk |
5.93 ns | 5.93 ns | +0.1% |
Regex_Caret_Period_Range_Dollar |
2.93 ns | 2.93 ns | +0.0% |
Regex_Nested_Backtrack |
32.09 ns | 33.35 ns | +3.9% |
Benchmark
|
| Benchmark | main |
This branch | Change |
|---|---|---|---|
JSON_Object_Defines_Miss_Too_Large |
3.45 ns | 4.09 ns | +18.3% |
JSON_Object_Defines_Miss_Same_Length |
3.46 ns | 4.08 ns | +17.9% |
URITemplateRouterView_Arguments |
538.74 ns | 586.91 ns | +8.9% |
URITemplateRouterView_Match |
217.54 ns | 236.23 ns | +8.6% |
Schema_Format_ISO_Language |
102.85 ms | 110.57 ms | +7.5% |
OpenAPI_Frame_GSMTasks_3_0 |
384.99 ms | 412.13 ms | +7.0% |
OpenAPI_Format_Synthetic_3_1 |
136.82 ms | 146.21 ms | +6.9% |
Schema_Bundle_Many_Remotes_With_Fragments |
29.84 ms | 31.65 ms | +6.1% |
Regex_Caret_Group_Period_Plus_Group_Dollar |
4.44 ns | 4.71 ns | +6.0% |
Regex_Period |
4.45 ns | 4.71 ns | +5.6% |
JSON_Parse_String_SSO_Plain |
4.16 us | 4.38 us | +5.2% |
Schema_Bundle_Meta_2020_12 |
1.52 ms | 1.60 ms | +5.1% |
Metapack_Parse_OMC_JSON_V2 |
n/a | 11.94 ns | new |
Metapack_Read_OMC_JSON_V2 |
n/a | 653.67 us | new |
Metapack_Write_OMC_JSON_V2 |
n/a | 2.22 ms | new |
JSON_Object_Defines_Miss_Too_Small |
4.08 ns | 3.77 ns | -7.6% |
Pointer_Walker_Schema_ISO_Language |
10.89 ms | 9.77 ms | -10.3% |
JSONLD_Catalog_Materialize |
11.24 ms | 9.56 ms | -14.9% |
Pointer_Object_Try_Traverse |
139.47 ns | 70.64 ns | -49.4% |
All 118 benchmarks
| Benchmark | main |
This branch | Change |
|---|---|---|---|
Regex_Lower_S_Or_Upper_S_Asterisk |
4.71 ns | 4.73 ns | +0.4% |
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar |
4.74 ns | 4.71 ns | -0.7% |
Regex_Period_Asterisk |
4.70 ns | 4.70 ns | -0.1% |
Regex_Group_Period_Asterisk_Group |
4.73 ns | 4.70 ns | -0.7% |
Regex_Period_Plus |
4.61 ns | 4.70 ns | +1.9% |
Regex_Period |
4.45 ns | 4.71 ns | +5.6% |
Regex_Caret_Period_Plus_Dollar |
4.60 ns | 4.70 ns | +2.1% |
Regex_Caret_Group_Period_Plus_Group_Dollar |
4.44 ns | 4.71 ns | +6.0% |
Regex_Caret_Period_Asterisk_Dollar |
4.71 ns | 4.70 ns | -0.1% |
Regex_Caret_Group_Period_Asterisk_Group_Dollar |
4.71 ns | 4.70 ns | -0.2% |
Regex_Caret_X_Hyphen |
7.85 ns | 7.83 ns | -0.2% |
Regex_Period_Md_Dollar |
46.50 ns | 46.29 ns | -0.4% |
Regex_Caret_Slash_Period_Asterisk |
7.55 ns | 7.52 ns | -0.4% |
Regex_Caret_Period_Range_Dollar |
5.34 ns | 5.34 ns | +0.0% |
Regex_Nested_Backtrack |
57.54 ns | 57.01 ns | -0.9% |
JSON_Array_Of_Objects_Unique |
524.75 ns | 515.76 ns | -1.7% |
JSON_Array_Of_Integers_Unique_256 |
4.78 us | 4.67 us | -2.3% |
JSON_Array_Of_Strings_Unique_Colliding_256 |
290.03 us | 291.09 us | +0.4% |
JSON_Parse_1 |
9.04 us | 8.70 us | -3.8% |
JSON_Parse_Real |
7.67 us | 7.60 us | -1.0% |
JSON_Parse_Real_Inexact |
7.25 us | 7.14 us | -1.5% |
JSON_Parse_Decimal |
12.50 us | 12.31 us | -1.5% |
JSON_Parse_Schema_ISO_Language |
8.04 ms | 8.14 ms | +1.3% |
JSON_Parse_KrakenD |
2.33 ms | 2.37 ms | +1.6% |
JSON_Stringify_ISO_Language |
10.32 ms | 10.32 ms | -0.0% |
JSON_Prettify_KrakenD |
7.78 ms | 7.67 ms | -1.4% |
JSON_Parse_Integer |
6.84 us | 6.64 us | -3.0% |
JSON_Parse_String_NonSSO_Plain |
8.35 us | 8.20 us | -1.9% |
JSON_Parse_String_SSO_Plain |
4.16 us | 4.38 us | +5.2% |
JSON_Parse_String_Escape_Heavy |
21.77 us | 22.07 us | +1.3% |
JSON_Parse_Object_Short_Keys |
13.67 us | 13.71 us | +0.3% |
JSON_Parse_Object_Scalar_Properties |
7.02 us | 7.04 us | +0.3% |
JSON_Parse_Object_Array_Properties |
11.36 us | 11.27 us | -0.8% |
JSON_Parse_Object_Object_Properties |
11.30 us | 11.26 us | -0.3% |
JSON_Parse_Nested_Containers |
78.66 us | 79.09 us | +0.5% |
JSON_Fast_Hash_Helm_Chart_Lock |
105.12 ns | 101.64 ns | -3.3% |
JSON_Equality_Helm_Chart_Lock |
209.42 ns | 208.57 ns | -0.4% |
JSON_String_Equal_10 |
10.04 ns | 10.05 ns | +0.1% |
JSON_String_Equal_100 |
11.37 ns | 11.32 ns | -0.4% |
JSON_String_Equal_Small_By_Perfect_Hash_10 |
2.20 ns | 2.19 ns | -0.1% |
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 |
14.21 ns | 14.12 ns | -0.6% |
JSON_String_Fast_Hash_10 |
6.55 ns | 6.28 ns | -4.2% |
JSON_String_Fast_Hash_100 |
6.57 ns | 6.32 ns | -3.8% |
JSON_String_Key_Hash_10 |
5.03 ns | 5.02 ns | -0.1% |
JSON_String_Key_Hash_100 |
11.87 ns | 11.89 ns | +0.1% |
JSON_Object_Defines_Miss_Same_Length |
3.46 ns | 4.08 ns | +17.9% |
JSON_Object_Defines_Miss_Too_Small |
4.08 ns | 3.77 ns | -7.6% |
JSON_Object_Defines_Miss_Too_Large |
3.45 ns | 4.09 ns | +18.3% |
JSON_From_String_Copy |
64.08 ns | 64.18 ns | +0.2% |
JSON_From_String_Temporary |
58.55 ns | 58.97 ns | +0.7% |
JSON_Number_To_Double |
40.91 ns | 40.60 ns | -0.7% |
JSON_Object_At_Last_Key_8 |
6.94 ns | 7.22 ns | +4.0% |
JSON_Object_At_Last_Key_32 |
22.91 ns | 23.23 ns | +1.4% |
JSON_Object_At_Last_Key_128 |
89.26 ns | 88.47 ns | -0.9% |
JSON_Object_At_Last_Key_512 |
420.40 ns | 423.03 ns | +0.6% |
JSON_Divisible_By_Decimal |
383.21 ns | 384.59 ns | +0.4% |
JSON_PropertySet_Contains |
79.83 ns | 77.63 ns | -2.8% |
JSON_PropertySet_Filter_Object_Properties |
50.38 ns | 48.62 ns | -3.5% |
JSON_PropertySet_Insert |
1.31 us | 1.31 us | -0.4% |
JSON_Stringify_Schema_Web_Of_Things |
231.62 us | 230.52 us | -0.5% |
JSON_Prettify_Schema_Web_Of_Things |
719.36 us | 726.00 us | +0.9% |
Pointer_Object_Traverse |
70.77 ns | 70.50 ns | -0.4% |
Pointer_Object_Try_Traverse |
139.47 ns | 70.64 ns | -49.4% |
Pointer_Push_Back_Pointer_To_Weak_Pointer |
191.17 ns | 183.20 ns | -4.2% |
Pointer_Walker_Schema_ISO_Language |
10.89 ms | 9.77 ms | -10.3% |
Pointer_Untracked_Deeply_Nested |
2.39 ms | 2.38 ms | -0.7% |
Pointer_Tracked_Deeply_Nested |
3.73 ms | 3.69 ms | -0.9% |
Pointer_Position_Tracker_Get_Deeply_Nested |
551.54 ns | 549.19 ns | -0.4% |
Schema_Tracker_ISO_Language |
11.60 ms | 11.50 ms | -0.8% |
Schema_Tracker_ISO_Language_To_JSON |
65.54 ms | 64.31 ms | -1.9% |
Schema_Frame_WoT_References |
5.21 ms | 5.09 ms | -2.2% |
Schema_Frame_OMC_References |
23.79 ms | 23.83 ms | +0.2% |
Schema_Frame_OMC_Pointers |
44.51 ms | 44.62 ms | +0.3% |
Schema_Frame_OMC_Locations |
20.95 ms | 21.08 ms | +0.6% |
Schema_Frame_ISO_Language_Locations |
91.68 ms | 88.10 ms | -3.9% |
Schema_Frame_ISO_Language_Root |
2.64 us | 2.61 us | -0.9% |
Schema_Frame_KrakenD_References |
43.15 ms | 42.70 ms | -1.0% |
Schema_Frame_KrakenD_Reachable |
332.20 ms | 327.73 ms | -1.3% |
Schema_Frame_ISO_Language_Locations_To_JSON |
175.93 ms | 178.15 ms | +1.3% |
Schema_Frame_Many_Resources_References |
383.27 ms | 399.08 ms | +4.1% |
Schema_Frame_Deeply_Nested_References |
24.34 ms | 23.64 ms | -2.9% |
Schema_Format_ISO_Language |
102.85 ms | 110.57 ms | +7.5% |
Schema_Bundle_Meta_2020_12 |
1.52 ms | 1.60 ms | +5.1% |
Schema_Bundle_Many_Remotes_With_Fragments |
29.84 ms | 31.65 ms | +6.1% |
OpenAPI_Frame_GSMTasks_3_0 |
384.99 ms | 412.13 ms | +7.0% |
OpenAPI_Format_Synthetic_3_1 |
136.82 ms | 146.21 ms | +6.9% |
JSONPath_Descendant_Filter_Nested |
2.87 us | 2.95 us | +2.9% |
URITemplateRouter_Create |
39.62 us | 39.46 us | -0.4% |
URITemplateRouter_Match |
234.34 ns | 241.71 ns | +3.1% |
URITemplateRouterView_Restore |
34.91 us | 35.27 us | +1.0% |
URITemplateRouterView_Match |
217.54 ns | 236.23 ns | +8.6% |
URITemplateRouterView_Arguments |
538.74 ns | 586.91 ns | +8.9% |
URITemplateRouter_Match_BasePath |
264.63 ns | 267.98 ns | +1.3% |
URITemplateRouterView_Match_BasePath |
246.73 ns | 251.27 ns | +1.8% |
JSONL_Parse_Large |
33.39 ms | 33.06 ms | -1.0% |
JSONL_Parse_Large_GZIP |
32.36 ms | 31.81 ms | -1.7% |
JSONLD_Catalog_Annotation_List_Populate |
3.17 ms | 3.10 ms | -2.3% |
JSONLD_Catalog_Materialize |
11.24 ms | 9.56 ms | -14.9% |
HTML_Build_Table_100000 |
67.28 ms | 68.03 ms | +1.1% |
HTML_Render_Table_100000 |
7.81 ms | 8.11 ms | +3.8% |
Markdown_To_HTML_Realistic_Document |
5.75 ms | 5.98 ms | +4.1% |
Markdown_To_HTML_Pathological |
17.56 ms | 17.32 ms | -1.4% |
Markdown_To_HTML_Short_Descriptions |
718.29 ns | 709.17 ns | -1.3% |
GZIP_Compress_ISO_Language_Set_3_Locations |
37.50 ms | 37.94 ms | +1.2% |
GZIP_Decompress_ISO_Language_Set_3_Locations |
9.83 ms | 9.72 ms | -1.2% |
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations |
12.11 ms | 12.14 ms | +0.3% |
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations |
14.73 ms | 14.65 ms | -0.5% |
GZIP_Compress_ISO_Language_Set_3_Schema |
2.31 ms | 2.32 ms | +0.5% |
GZIP_Decompress_ISO_Language_Set_3_Schema |
631.27 us | 644.03 us | +2.0% |
JOSE_VerifySignature_RS256 |
21.29 us | 21.21 us | -0.4% |
JOSE_VerifySignature_ES512 |
1.53 ms | 1.52 ms | -0.4% |
Crypto_CRC32_Large_JSONL |
103.04 us | 103.07 us | +0.0% |
Crypto_AES_GCM_Encrypt_128_1KB |
2.34 us | 2.34 us | -0.1% |
Crypto_AES_GCM_Decrypt_128_1KB |
2.34 us | 2.34 us | -0.2% |
Crypto_AES_GCM_Encrypt_256_1KB |
2.41 us | 2.41 us | +0.2% |
Metapack_Parse_OMC_JSON_V2 |
n/a | 11.94 ns | new |
Metapack_Read_OMC_JSON_V2 |
n/a | 653.67 us | new |
Metapack_Write_OMC_JSON_V2 |
n/a | 2.22 ms | new |
Benchmark
|
| Benchmark | main |
This branch | Change |
|---|---|---|---|
Regex_Caret_Period_Plus_Dollar |
1.74 ns | 3.19 ns | +82.8% |
Regex_Caret_Period_Asterisk_Dollar |
1.74 ns | 2.89 ns | +66.0% |
URITemplateRouterView_Match_BasePath |
149.57 ns | 242.94 ns | +62.4% |
Regex_Period |
1.76 ns | 2.84 ns | +61.7% |
Regex_Caret_Group_Period_Plus_Group_Dollar |
1.80 ns | 2.80 ns | +55.5% |
JSON_Parse_Real_Inexact |
3.79 us | 5.70 us | +50.4% |
JSON_Array_Of_Objects_Unique |
429.59 ns | 626.73 ns | +45.9% |
JSON_Parse_1 |
3.63 us | 5.25 us | +44.6% |
JSON_Parse_Real |
3.83 us | 5.44 us | +42.3% |
JSON_Array_Of_Integers_Unique_256 |
4.90 us | 6.79 us | +38.7% |
Regex_Caret_Group_Period_Asterisk_Group_Dollar |
1.76 ns | 2.41 ns | +36.7% |
Pointer_Walker_Schema_ISO_Language |
1.60 ms | 2.18 ms | +36.0% |
Schema_Bundle_Meta_2020_12 |
451.36 us | 599.31 us | +32.8% |
Regex_Caret_Period_Range_Dollar |
2.29 ns | 3.02 ns | +32.1% |
Regex_Group_Period_Asterisk_Group |
1.70 ns | 2.22 ns | +30.7% |
Regex_Period_Plus |
1.69 ns | 2.18 ns | +28.8% |
Regex_Lower_S_Or_Upper_S_Asterisk |
1.67 ns | 2.14 ns | +28.2% |
JSON_Parse_Decimal |
6.27 us | 8.02 us | +27.8% |
Regex_Period_Asterisk |
1.72 ns | 2.19 ns | +27.1% |
Regex_Nested_Backtrack |
30.98 ns | 39.03 ns | +26.0% |
Regex_Caret_Slash_Period_Asterisk |
6.63 ns | 8.09 ns | +22.0% |
JSON_Parse_KrakenD |
987.96 us | 1.20 ms | +21.9% |
JSON_Parse_Schema_ISO_Language |
2.82 ms | 3.37 ms | +19.3% |
JSON_Stringify_ISO_Language |
2.62 ms | 3.09 ms | +17.7% |
JSONL_Parse_Large_GZIP |
6.23 ms | 7.22 ms | +15.9% |
Schema_Frame_Deeply_Nested_References |
12.98 ms | 14.95 ms | +15.1% |
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar |
1.68 ns | 1.91 ns | +13.6% |
JSON_Array_Of_Strings_Unique_Colliding_256 |
178.50 us | 201.12 us | +12.7% |
Pointer_Position_Tracker_Get_Deeply_Nested |
390.28 ns | 435.99 ns | +11.7% |
URITemplateRouterView_Match |
134.71 ns | 150.22 ns | +11.5% |
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations |
5.73 ms | 6.29 ms | +9.7% |
Schema_Tracker_ISO_Language_To_JSON |
10.91 ms | 11.85 ms | +8.6% |
JSONLD_Catalog_Materialize |
2.58 ms | 2.77 ms | +7.0% |
OpenAPI_Frame_GSMTasks_3_0 |
146.96 ms | 156.28 ms | +6.3% |
Regex_Caret_X_Hyphen |
7.83 ns | 8.30 ns | +6.0% |
Pointer_Untracked_Deeply_Nested |
953.73 us | 1.01 ms | +6.0% |
Markdown_To_HTML_Short_Descriptions |
342.19 ns | 360.49 ns | +5.3% |
Metapack_Parse_OMC_JSON_V2 |
n/a | 1.28 ns | new |
Metapack_Read_OMC_JSON_V2 |
n/a | 261.11 us | new |
Metapack_Write_OMC_JSON_V2 |
n/a | 747.64 us | new |
GZIP_Decompress_ISO_Language_Set_3_Schema |
327.41 us | 309.27 us | -5.5% |
GZIP_Compress_ISO_Language_Set_3_Schema |
1.89 ms | 1.78 ms | -5.8% |
Crypto_AES_GCM_Decrypt_128_1KB |
3.93 us | 3.70 us | -5.9% |
JSON_String_Equal_100 |
7.67 ns | 7.21 ns | -6.0% |
Pointer_Object_Try_Traverse |
38.64 ns | 36.26 ns | -6.1% |
Schema_Frame_WoT_References |
1.98 ms | 1.85 ms | -6.4% |
URITemplateRouter_Match_BasePath |
228.01 ns | 212.44 ns | -6.8% |
URITemplateRouterView_Restore |
11.47 us | 10.68 us | -6.9% |
HTML_Render_Table_100000 |
2.09 ms | 1.93 ms | -7.3% |
JOSE_VerifySignature_ES512 |
1.06 ms | 977.43 us | -7.6% |
Schema_Frame_Many_Resources_References |
91.44 ms | 84.34 ms | -7.8% |
Markdown_To_HTML_Pathological |
11.40 ms | 10.48 ms | -8.1% |
Schema_Frame_OMC_Locations |
8.39 ms | 7.70 ms | -8.2% |
JSON_Object_At_Last_Key_512 |
238.58 ns | 219.11 ns | -8.2% |
Schema_Bundle_Many_Remotes_With_Fragments |
6.00 ms | 5.49 ms | -8.4% |
JSON_Number_To_Double |
12.11 ns | 11.08 ns | -8.5% |
Crypto_CRC32_Large_JSONL |
22.97 us | 21.00 us | -8.6% |
JSON_Equality_Helm_Chart_Lock |
251.79 ns | 229.80 ns | -8.7% |
JSON_Divisible_By_Decimal |
264.21 ns | 240.09 ns | -9.1% |
JSON_Fast_Hash_Helm_Chart_Lock |
69.89 ns | 63.29 ns | -9.4% |
HTML_Build_Table_100000 |
31.59 ms | 28.46 ms | -9.9% |
JSON_String_Equal_10 |
9.25 ns | 8.23 ns | -11.0% |
JSON_Object_Defines_Miss_Too_Small |
3.75 ns | 3.32 ns | -11.5% |
JSON_Parse_Nested_Containers |
31.38 us | 27.67 us | -11.8% |
JSON_Object_Defines_Miss_Too_Large |
3.39 ns | 2.99 ns | -11.9% |
Schema_Frame_ISO_Language_Locations |
26.11 ms | 22.99 ms | -11.9% |
Crypto_AES_GCM_Encrypt_128_1KB |
4.06 us | 3.49 us | -13.9% |
Schema_Frame_KrakenD_Reachable |
200.08 ms | 171.12 ms | -14.5% |
JSON_Prettify_KrakenD |
2.66 ms | 2.26 ms | -14.9% |
JSON_String_Equal_Small_By_Perfect_Hash_10 |
0.42 ns | 0.35 ns | -15.7% |
Schema_Frame_ISO_Language_Locations_To_JSON |
26.77 ms | 22.36 ms | -16.5% |
JSON_Object_At_Last_Key_128 |
67.12 ns | 56.06 ns | -16.5% |
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 |
4.26 ns | 3.54 ns | -17.0% |
Schema_Frame_KrakenD_References |
17.47 ms | 14.44 ms | -17.4% |
JSON_Parse_String_NonSSO_Plain |
4.71 us | 3.89 us | -17.4% |
JSON_From_String_Temporary |
8.61 ns | 7.05 ns | -18.1% |
Crypto_AES_GCM_Encrypt_256_1KB |
4.20 us | 3.41 us | -18.9% |
JSON_Parse_Integer |
4.22 us | 3.41 us | -19.1% |
JSON_From_String_Copy |
13.90 ns | 11.20 ns | -19.4% |
JSON_Parse_String_Escape_Heavy |
24.92 us | 20.08 us | -19.4% |
JSON_Object_At_Last_Key_32 |
16.18 ns | 13.03 ns | -19.5% |
OpenAPI_Format_Synthetic_3_1 |
54.34 ms | 43.70 ms | -19.6% |
Schema_Frame_OMC_Pointers |
21.52 ms | 17.26 ms | -19.8% |
JSON_String_Key_Hash_100 |
3.14 ns | 2.52 ns | -19.8% |
JSON_Object_At_Last_Key_8 |
5.57 ns | 4.39 ns | -21.3% |
JSON_Parse_Object_Scalar_Properties |
3.82 us | 3.01 us | -21.3% |
JSON_Parse_Object_Object_Properties |
4.70 us | 3.68 us | -21.8% |
JSON_Parse_Object_Short_Keys |
7.73 us | 5.95 us | -23.0% |
JSON_PropertySet_Filter_Object_Properties |
51.31 ns | 39.17 ns | -23.7% |
JSON_String_Key_Hash_10 |
2.45 ns | 1.84 ns | -24.9% |
JSONPath_Descendant_Filter_Nested |
1.86 us | 1.37 us | -26.2% |
JSON_String_Fast_Hash_10 |
3.29 ns | 2.33 ns | -29.1% |
JSON_String_Fast_Hash_100 |
2.65 ns | 1.85 ns | -30.3% |
Markdown_To_HTML_Realistic_Document |
5.02 ms | 3.32 ms | -33.8% |
All 118 benchmarks
| Benchmark | main |
This branch | Change |
|---|---|---|---|
Regex_Lower_S_Or_Upper_S_Asterisk |
1.67 ns | 2.14 ns | +28.2% |
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar |
1.68 ns | 1.91 ns | +13.6% |
Regex_Period_Asterisk |
1.72 ns | 2.19 ns | +27.1% |
Regex_Group_Period_Asterisk_Group |
1.70 ns | 2.22 ns | +30.7% |
Regex_Period_Plus |
1.69 ns | 2.18 ns | +28.8% |
Regex_Period |
1.76 ns | 2.84 ns | +61.7% |
Regex_Caret_Period_Plus_Dollar |
1.74 ns | 3.19 ns | +82.8% |
Regex_Caret_Group_Period_Plus_Group_Dollar |
1.80 ns | 2.80 ns | +55.5% |
Regex_Caret_Period_Asterisk_Dollar |
1.74 ns | 2.89 ns | +66.0% |
Regex_Caret_Group_Period_Asterisk_Group_Dollar |
1.76 ns | 2.41 ns | +36.7% |
Regex_Caret_X_Hyphen |
7.83 ns | 8.30 ns | +6.0% |
Regex_Period_Md_Dollar |
25.85 ns | 25.67 ns | -0.7% |
Regex_Caret_Slash_Period_Asterisk |
6.63 ns | 8.09 ns | +22.0% |
Regex_Caret_Period_Range_Dollar |
2.29 ns | 3.02 ns | +32.1% |
Regex_Nested_Backtrack |
30.98 ns | 39.03 ns | +26.0% |
JSON_Array_Of_Objects_Unique |
429.59 ns | 626.73 ns | +45.9% |
JSON_Array_Of_Integers_Unique_256 |
4.90 us | 6.79 us | +38.7% |
JSON_Array_Of_Strings_Unique_Colliding_256 |
178.50 us | 201.12 us | +12.7% |
JSON_Parse_1 |
3.63 us | 5.25 us | +44.6% |
JSON_Parse_Real |
3.83 us | 5.44 us | +42.3% |
JSON_Parse_Real_Inexact |
3.79 us | 5.70 us | +50.4% |
JSON_Parse_Decimal |
6.27 us | 8.02 us | +27.8% |
JSON_Parse_Schema_ISO_Language |
2.82 ms | 3.37 ms | +19.3% |
JSON_Parse_KrakenD |
987.96 us | 1.20 ms | +21.9% |
JSON_Stringify_ISO_Language |
2.62 ms | 3.09 ms | +17.7% |
JSON_Prettify_KrakenD |
2.66 ms | 2.26 ms | -14.9% |
JSON_Parse_Integer |
4.22 us | 3.41 us | -19.1% |
JSON_Parse_String_NonSSO_Plain |
4.71 us | 3.89 us | -17.4% |
JSON_Parse_String_SSO_Plain |
2.47 us | 2.46 us | -0.2% |
JSON_Parse_String_Escape_Heavy |
24.92 us | 20.08 us | -19.4% |
JSON_Parse_Object_Short_Keys |
7.73 us | 5.95 us | -23.0% |
JSON_Parse_Object_Scalar_Properties |
3.82 us | 3.01 us | -21.3% |
JSON_Parse_Object_Array_Properties |
4.12 us | 3.96 us | -4.0% |
JSON_Parse_Object_Object_Properties |
4.70 us | 3.68 us | -21.8% |
JSON_Parse_Nested_Containers |
31.38 us | 27.67 us | -11.8% |
JSON_Fast_Hash_Helm_Chart_Lock |
69.89 ns | 63.29 ns | -9.4% |
JSON_Equality_Helm_Chart_Lock |
251.79 ns | 229.80 ns | -8.7% |
JSON_String_Equal_10 |
9.25 ns | 8.23 ns | -11.0% |
JSON_String_Equal_100 |
7.67 ns | 7.21 ns | -6.0% |
JSON_String_Equal_Small_By_Perfect_Hash_10 |
0.42 ns | 0.35 ns | -15.7% |
JSON_String_Equal_Small_By_Runtime_Perfect_Hash_10 |
4.26 ns | 3.54 ns | -17.0% |
JSON_String_Fast_Hash_10 |
3.29 ns | 2.33 ns | -29.1% |
JSON_String_Fast_Hash_100 |
2.65 ns | 1.85 ns | -30.3% |
JSON_String_Key_Hash_10 |
2.45 ns | 1.84 ns | -24.9% |
JSON_String_Key_Hash_100 |
3.14 ns | 2.52 ns | -19.8% |
JSON_Object_Defines_Miss_Same_Length |
3.51 ns | 3.53 ns | +0.4% |
JSON_Object_Defines_Miss_Too_Small |
3.75 ns | 3.32 ns | -11.5% |
JSON_Object_Defines_Miss_Too_Large |
3.39 ns | 2.99 ns | -11.9% |
JSON_From_String_Copy |
13.90 ns | 11.20 ns | -19.4% |
JSON_From_String_Temporary |
8.61 ns | 7.05 ns | -18.1% |
JSON_Number_To_Double |
12.11 ns | 11.08 ns | -8.5% |
JSON_Object_At_Last_Key_8 |
5.57 ns | 4.39 ns | -21.3% |
JSON_Object_At_Last_Key_32 |
16.18 ns | 13.03 ns | -19.5% |
JSON_Object_At_Last_Key_128 |
67.12 ns | 56.06 ns | -16.5% |
JSON_Object_At_Last_Key_512 |
238.58 ns | 219.11 ns | -8.2% |
JSON_Divisible_By_Decimal |
264.21 ns | 240.09 ns | -9.1% |
JSON_PropertySet_Contains |
51.09 ns | 51.14 ns | +0.1% |
JSON_PropertySet_Filter_Object_Properties |
51.31 ns | 39.17 ns | -23.7% |
JSON_PropertySet_Insert |
323.49 ns | 316.84 ns | -2.1% |
JSON_Stringify_Schema_Web_Of_Things |
65.99 us | 67.31 us | +2.0% |
JSON_Prettify_Schema_Web_Of_Things |
187.39 us | 195.60 us | +4.4% |
Pointer_Object_Traverse |
21.56 ns | 22.22 ns | +3.1% |
Pointer_Object_Try_Traverse |
38.64 ns | 36.26 ns | -6.1% |
Pointer_Push_Back_Pointer_To_Weak_Pointer |
151.80 ns | 150.06 ns | -1.1% |
Pointer_Walker_Schema_ISO_Language |
1.60 ms | 2.18 ms | +36.0% |
Pointer_Untracked_Deeply_Nested |
953.73 us | 1.01 ms | +6.0% |
Pointer_Tracked_Deeply_Nested |
1.22 ms | 1.16 ms | -4.8% |
Pointer_Position_Tracker_Get_Deeply_Nested |
390.28 ns | 435.99 ns | +11.7% |
Schema_Tracker_ISO_Language |
3.11 ms | 3.20 ms | +2.9% |
Schema_Tracker_ISO_Language_To_JSON |
10.91 ms | 11.85 ms | +8.6% |
Schema_Frame_WoT_References |
1.98 ms | 1.85 ms | -6.4% |
Schema_Frame_OMC_References |
9.66 ms | 9.27 ms | -4.0% |
Schema_Frame_OMC_Pointers |
21.52 ms | 17.26 ms | -19.8% |
Schema_Frame_OMC_Locations |
8.39 ms | 7.70 ms | -8.2% |
Schema_Frame_ISO_Language_Locations |
26.11 ms | 22.99 ms | -11.9% |
Schema_Frame_ISO_Language_Root |
128.30 ns | 126.77 ns | -1.2% |
Schema_Frame_KrakenD_References |
17.47 ms | 14.44 ms | -17.4% |
Schema_Frame_KrakenD_Reachable |
200.08 ms | 171.12 ms | -14.5% |
Schema_Frame_ISO_Language_Locations_To_JSON |
26.77 ms | 22.36 ms | -16.5% |
Schema_Frame_Many_Resources_References |
91.44 ms | 84.34 ms | -7.8% |
Schema_Frame_Deeply_Nested_References |
12.98 ms | 14.95 ms | +15.1% |
Schema_Format_ISO_Language |
27.38 ms | 27.97 ms | +2.2% |
Schema_Bundle_Meta_2020_12 |
451.36 us | 599.31 us | +32.8% |
Schema_Bundle_Many_Remotes_With_Fragments |
6.00 ms | 5.49 ms | -8.4% |
OpenAPI_Frame_GSMTasks_3_0 |
146.96 ms | 156.28 ms | +6.3% |
OpenAPI_Format_Synthetic_3_1 |
54.34 ms | 43.70 ms | -19.6% |
JSONPath_Descendant_Filter_Nested |
1.86 us | 1.37 us | -26.2% |
URITemplateRouter_Create |
19.41 us | 18.58 us | -4.2% |
URITemplateRouter_Match |
190.58 ns | 185.54 ns | -2.6% |
URITemplateRouterView_Restore |
11.47 us | 10.68 us | -6.9% |
URITemplateRouterView_Match |
134.71 ns | 150.22 ns | +11.5% |
URITemplateRouterView_Arguments |
606.22 ns | 586.01 ns | -3.3% |
URITemplateRouter_Match_BasePath |
228.01 ns | 212.44 ns | -6.8% |
URITemplateRouterView_Match_BasePath |
149.57 ns | 242.94 ns | +62.4% |
JSONL_Parse_Large |
6.45 ms | 6.36 ms | -1.4% |
JSONL_Parse_Large_GZIP |
6.23 ms | 7.22 ms | +15.9% |
JSONLD_Catalog_Annotation_List_Populate |
521.10 us | 526.94 us | +1.1% |
JSONLD_Catalog_Materialize |
2.58 ms | 2.77 ms | +7.0% |
HTML_Build_Table_100000 |
31.59 ms | 28.46 ms | -9.9% |
HTML_Render_Table_100000 |
2.09 ms | 1.93 ms | -7.3% |
Markdown_To_HTML_Realistic_Document |
5.02 ms | 3.32 ms | -33.8% |
Markdown_To_HTML_Pathological |
11.40 ms | 10.48 ms | -8.1% |
Markdown_To_HTML_Short_Descriptions |
342.19 ns | 360.49 ns | +5.3% |
GZIP_Compress_ISO_Language_Set_3_Locations |
31.66 ms | 31.29 ms | -1.2% |
GZIP_Decompress_ISO_Language_Set_3_Locations |
3.28 ms | 3.36 ms | +2.4% |
GZIP_Decompress_Default_Level_ISO_Language_Set_3_Locations |
4.77 ms | 4.65 ms | -2.7% |
GZIP_Decompress_Stream_Default_Level_ISO_Language_Set_3_Locations |
5.73 ms | 6.29 ms | +9.7% |
GZIP_Compress_ISO_Language_Set_3_Schema |
1.89 ms | 1.78 ms | -5.8% |
GZIP_Decompress_ISO_Language_Set_3_Schema |
327.41 us | 309.27 us | -5.5% |
JOSE_VerifySignature_RS256 |
23.00 us | 22.45 us | -2.4% |
JOSE_VerifySignature_ES512 |
1.06 ms | 977.43 us | -7.6% |
Crypto_CRC32_Large_JSONL |
22.97 us | 21.00 us | -8.6% |
Crypto_AES_GCM_Encrypt_128_1KB |
4.06 us | 3.49 us | -13.9% |
Crypto_AES_GCM_Decrypt_128_1KB |
3.93 us | 3.70 us | -5.9% |
Crypto_AES_GCM_Encrypt_256_1KB |
4.20 us | 3.41 us | -18.9% |
Metapack_Parse_OMC_JSON_V2 |
n/a | 1.28 ns | new |
Metapack_Read_OMC_JSON_V2 |
n/a | 261.11 us | new |
Metapack_Write_OMC_JSON_V2 |
n/a | 747.64 us | new |
There was a problem hiding this comment.
1 issue found across 9 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/extra/metapack/include/sourcemeta/core/metapack_error.h">
<violation number="1" location="src/extra/metapack/include/sourcemeta/core/metapack_error.h:28">
P2: This public constructor stores a caller-owned pointer without taking ownership or rejecting null. A temporary or dynamic string's `c_str()` can dangle before the exception is handled, and `nullptr` makes `what()` invalid; copy the message into owned storage or constrain the API to validated static literals.</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
| class SOURCEMETA_CORE_METAPACK_EXPORT MetapackError : public std::exception { | ||
| public: | ||
| /// Construct an error with the given message | ||
| MetapackError(const char *message) : message_{message} {} |
There was a problem hiding this comment.
P2: This public constructor stores a caller-owned pointer without taking ownership or rejecting null. A temporary or dynamic string's c_str() can dangle before the exception is handled, and nullptr makes what() invalid; copy the message into owned storage or constrain the API to validated static literals.
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/extra/metapack/include/sourcemeta/core/metapack_error.h, line 28:
<comment>This public constructor stores a caller-owned pointer without taking ownership or rejecting null. A temporary or dynamic string's `c_str()` can dangle before the exception is handled, and `nullptr` makes `what()` invalid; copy the message into owned storage or constrain the API to validated static literals.</comment>
<file context>
@@ -0,0 +1,47 @@
+class SOURCEMETA_CORE_METAPACK_EXPORT MetapackError : public std::exception {
+public:
+ /// Construct an error with the given message
+ MetapackError(const char *message) : message_{message} {}
+ MetapackError(std::string message) = delete;
+ MetapackError(std::string &&message) = delete;
</file context>
Signed-off-by: Juan Cruz Viotti jv@jviotti.com