Skip to content

Use Security Framework and CNG on macOS/Windows when possible#2494

Merged
jviotti merged 1 commit into
mainfrom
platform-revise-crypto
Jun 12, 2026
Merged

Use Security Framework and CNG on macOS/Windows when possible#2494
jviotti merged 1 commit into
mainfrom
platform-revise-crypto

Conversation

@jviotti

@jviotti jviotti commented Jun 12, 2026

Copy link
Copy Markdown
Member

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

Review in cubic

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

augmentcode Bot commented Jun 12, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR updates the crypto component to prefer native OS cryptography APIs on macOS and Windows when OpenSSL is not explicitly used.

Changes:

  • Require OpenSSL >= 3.0 when building against the system OpenSSL
  • On macOS, link against the Security framework and use CommonCrypto/Security for SHA + RNG
  • On Windows, link against CNG (`bcrypt`) and use BCrypt hashing + RNG APIs
  • Refactor SHA-1/SHA-256 implementations to add platform-specific backends with chunked updates
  • Refactor UUIDv4 generation to centralize random-byte generation behind a platform provider

Technical Notes: The SHA helpers now share a common “hex digest” formatting approach across backends, and UUID randomness comes from OpenSSL / Security.framework / CNG when available.

🤖 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. 1 suggestion posted.

Fix All in Augment

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

// the pointer, and it takes a 32-bit length, so larger inputs must be
// fed in chunks
auto *remaining_data{
reinterpret_cast<unsigned char *>(const_cast<char *>(input.data()))};

@augmentcode augmentcode Bot Jun 12, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

On Windows this casts away constness to pass input.data() into BCryptHashData; if the API ever writes through that pointer it could be UB when input references read-only storage (e.g., a string literal). Consider avoiding passing a non-const pointer derived from std::string_view into the CNG APIs.

Severity: medium

Other Locations
  • src/core/crypto/crypto_sha256.cc:130

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@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 6 files

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

Re-trigger cubic

Comment thread config.cmake.in

@github-actions github-actions 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.

Benchmark (windows/msvc)

Details
Benchmark suite Current: efffce6 Previous: 88b3837 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 4.961981999999807 ns/iter 4.971521999996185 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 5.002161607143713 ns/iter 5.022078193084633 ns/iter 1.00
Regex_Period_Asterisk 4.954414999999699 ns/iter 4.965586000002986 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 4.969602999999552 ns/iter 4.960858939644039 ns/iter 1.00
Regex_Period_Plus 4.606845545996725 ns/iter 4.603688179921272 ns/iter 1.00
Regex_Period 4.601239965627747 ns/iter 4.603341304919393 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 4.600429229775778 ns/iter 4.610144877074063 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 4.656018090749817 ns/iter 4.6052497870639755 ns/iter 1.01
Regex_Caret_Period_Asterisk_Dollar 4.957298572534463 ns/iter 4.964975999996568 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 4.957377999999153 ns/iter 4.95746874999879 ns/iter 1.00
Regex_Caret_X_Hyphen 7.792860491070895 ns/iter 7.955510044642519 ns/iter 0.98
Regex_Period_Md_Dollar 60.06380357141389 ns/iter 71.04658035712775 ns/iter 0.85
Regex_Caret_Slash_Period_Asterisk 7.468527678572709 ns/iter 7.5451232142873845 ns/iter 0.99
Regex_Caret_Period_Range_Dollar 5.318270535714273 ns/iter 5.334846999999172 ns/iter 1.00
Regex_Nested_Backtrack 80.32042944995932 ns/iter 66.41446428574227 ns/iter 1.21
JSON_Array_Of_Objects_Unique 516.2569642856901 ns/iter 513.9602678570197 ns/iter 1.00
JSON_Parse_1 9947.795312498898 ns/iter 9384.682657665146 ns/iter 1.06
JSON_Parse_Real 17896.43234217891 ns/iter 18214.451021875775 ns/iter 0.98
JSON_Parse_Decimal 11168.156250001004 ns/iter 11319.780357138956 ns/iter 0.99
JSON_Parse_Schema_ISO_Language 7853695.555556645 ns/iter 7956815.555558529 ns/iter 0.99
JSON_Parse_Integer 5890.211000000818 ns/iter 5896.08392857193 ns/iter 1.00
JSON_Parse_String_NonSSO_Plain 8124.956473213477 ns/iter 9128.489158529623 ns/iter 0.89
JSON_Parse_String_SSO_Plain 3830.642266709976 ns/iter 3626.0957065036064 ns/iter 1.06
JSON_Parse_String_Escape_Heavy 21746.59625094647 ns/iter 22142.99062499947 ns/iter 0.98
JSON_Parse_Object_Short_Keys 13675.071428573508 ns/iter 13222.877576442377 ns/iter 1.03
JSON_Parse_Object_Scalar_Properties 6782.50446428714 ns/iter 6827.5323660722215 ns/iter 0.99
JSON_Parse_Object_Array_Properties 12629.376785716722 ns/iter 11531.689062501015 ns/iter 1.10
JSON_Parse_Object_Object_Properties 13014.867857143436 ns/iter 11692.4428571435 ns/iter 1.11
JSON_Parse_Nested_Containers 87374.86272936645 ns/iter 83487.6562500142 ns/iter 1.05
JSON_From_String_Copy 65.70245535714645 ns/iter 62.3008214285749 ns/iter 1.05
JSON_From_String_Temporary 89.71146205356868 ns/iter 81.30217633929452 ns/iter 1.10
JSON_Number_To_Double 147.61571428571025 ns/iter 131.84746286396455 ns/iter 1.12
JSON_Object_At_Last_Key/8 7.47229352678553 ns/iter 7.710766741071089 ns/iter 0.97
JSON_Object_At_Last_Key/32 26.282899506358422 ns/iter 27.702642857142177 ns/iter 0.95
JSON_Object_At_Last_Key/128 95.62646894525062 ns/iter 93.83663420375723 ns/iter 1.02
JSON_Object_At_Last_Key/512 434.2748781233741 ns/iter 430.335874999912 ns/iter 1.01
JSON_Fast_Hash_Helm_Chart_Lock 66.33122321427923 ns/iter 70.00408035712066 ns/iter 0.95
JSON_Equality_Helm_Chart_Lock 294.8628331625803 ns/iter 313.669821428521 ns/iter 0.94
JSON_Divisible_By_Decimal 371.55238712284176 ns/iter 353.4240440314711 ns/iter 1.05
JSON_String_Equal/10 14.246186320329164 ns/iter 14.17661250000687 ns/iter 1.00
JSON_String_Equal/100 26.24681428571713 ns/iter 19.0222601720275 ns/iter 1.38
JSON_String_Equal_Small_By_Perfect_Hash/10 2.131645624999834 ns/iter 2.130798437499948 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.385687500001561 ns/iter 15.279618303572256 ns/iter 0.94
JSON_String_Fast_Hash/10 4.9750730000005206 ns/iter 4.688662510464048 ns/iter 1.06
JSON_String_Fast_Hash/100 4.70054197477826 ns/iter 4.613615826922914 ns/iter 1.02
JSON_String_Key_Hash/10 4.9668875000017065 ns/iter 4.959297000000333 ns/iter 1.00
JSON_String_Key_Hash/100 11.01120000000222 ns/iter 10.981646875002582 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 5.2235079999991285 ns/iter 5.1419769999984055 ns/iter 1.02
JSON_Object_Defines_Miss_Too_Small 4.637623024328045 ns/iter 4.607002778868214 ns/iter 1.01
JSON_Object_Defines_Miss_Too_Large 3.913126116071705 ns/iter 4.027675707093983 ns/iter 0.97
Pointer_Object_Traverse 69.20886607143676 ns/iter 67.88790178571195 ns/iter 1.02
Pointer_Object_Try_Traverse 68.71637500000003 ns/iter 68.30587053571995 ns/iter 1.01
Pointer_Push_Back_Pointer_To_Weak_Pointer 176.73227299549748 ns/iter 157.756875000002 ns/iter 1.12
Pointer_Walker_Schema_ISO_Language 9734914.666666253 ns/iter 8707612.222219218 ns/iter 1.12
Pointer_Maybe_Tracked_Deeply_Nested/0 2511445.762711716 ns/iter 2474395.9839363387 ns/iter 1.01
Pointer_Maybe_Tracked_Deeply_Nested/1 3770461.452513802 ns/iter 3724978.074866829 ns/iter 1.01
Pointer_Position_Tracker_Get_Deeply_Nested 599.7360491072358 ns/iter 566.1434151785929 ns/iter 1.06
URITemplateRouter_Create 41374.56249999616 ns/iter 38696.60898910851 ns/iter 1.07
URITemplateRouter_Match 206.08886871130133 ns/iter 196.02829705235519 ns/iter 1.05
URITemplateRouter_Match_BasePath 239.18418750000114 ns/iter 225.7535312500636 ns/iter 1.06
URITemplateRouterView_Restore 24676.564285714776 ns/iter 23980.028124689437 ns/iter 1.03
URITemplateRouterView_Match 153.97928709683333 ns/iter 153.06205357146854 ns/iter 1.01
URITemplateRouterView_Match_BasePath 197.57489269475062 ns/iter 172.04683741389144 ns/iter 1.15
URITemplateRouterView_Arguments 580.367589285759 ns/iter 571.1393750000784 ns/iter 1.02
JSONL_Parse_Large 34704452.380960256 ns/iter 32600480.95238571 ns/iter 1.06
JSONL_Parse_Large_GZIP 35216464.999996334 ns/iter 33103157.142856315 ns/iter 1.06
HTML_Build_Table_100000 92186128.57141903 ns/iter 92282142.85719463 ns/iter 1.00
HTML_Render_Table_100000 8323189.9999999665 ns/iter 8176434.44444103 ns/iter 1.02
GZIP_Compress_ISO_Language_Set_3_Locations 38233573.68421392 ns/iter 37746221.05263341 ns/iter 1.01
GZIP_Decompress_ISO_Language_Set_3_Locations 10641314.062500129 ns/iter 10775324.999997338 ns/iter 0.99
GZIP_Compress_ISO_Language_Set_3_Schema 2346207.3578598103 ns/iter 2313382.500000216 ns/iter 1.01
GZIP_Decompress_ISO_Language_Set_3_Schema 593265.5357142381 ns/iter 589198.6607143248 ns/iter 1.01

This comment was automatically generated by workflow using github-action-benchmark.

@jviotti jviotti merged commit 166a543 into main Jun 12, 2026
13 checks passed
@jviotti jviotti deleted the platform-revise-crypto branch June 12, 2026 19:44

@github-actions github-actions 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.

Benchmark (macos/llvm)

Details
Benchmark suite Current: efffce6 Previous: 88b3837 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.8139573515663958 ns/iter 2.062384074732017 ns/iter 0.88
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.7198203927165099 ns/iter 1.7165951513802022 ns/iter 1.00
Regex_Period_Asterisk 1.729990835411148 ns/iter 1.757190276183713 ns/iter 0.98
Regex_Group_Period_Asterisk_Group 1.72409439409488 ns/iter 1.7169152261835297 ns/iter 1.00
Regex_Period_Plus 2.1396960655642383 ns/iter 2.4097342250804474 ns/iter 0.89
Regex_Period 2.0774624720251733 ns/iter 2.183705032043331 ns/iter 0.95
Regex_Caret_Period_Plus_Dollar 2.1763132746816476 ns/iter 2.0768008514548932 ns/iter 1.05
Regex_Caret_Group_Period_Plus_Group_Dollar 2.1283056709199566 ns/iter 2.0780884115619003 ns/iter 1.02
Regex_Caret_Period_Asterisk_Dollar 1.7309188407697444 ns/iter 1.7260187858040468 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.7201401454020437 ns/iter 1.7211353367278652 ns/iter 1.00
Regex_Caret_X_Hyphen 6.506196697875927 ns/iter 6.148264636223435 ns/iter 1.06
Regex_Period_Md_Dollar 17.80669123229808 ns/iter 17.14993455727737 ns/iter 1.04
Regex_Caret_Slash_Period_Asterisk 4.864241883690715 ns/iter 4.693365148490036 ns/iter 1.04
Regex_Caret_Period_Range_Dollar 2.0448155093658933 ns/iter 2.0553699051394756 ns/iter 0.99
Regex_Nested_Backtrack 25.445600662329266 ns/iter 25.090981623398896 ns/iter 1.01
JSON_Array_Of_Objects_Unique 347.2398003465749 ns/iter 441.02169147166893 ns/iter 0.79
JSON_Parse_1 4023.678165188175 ns/iter 3801.7570297098573 ns/iter 1.06
JSON_Parse_Real 6229.870602958545 ns/iter 5218.99433096394 ns/iter 1.19
JSON_Parse_Decimal 6787.962902307965 ns/iter 5726.171715125304 ns/iter 1.19
JSON_Parse_Schema_ISO_Language 3361888.885714442 ns/iter 3010172.008546947 ns/iter 1.12
JSON_Parse_Integer 3313.8053334298047 ns/iter 3029.325372437531 ns/iter 1.09
JSON_Parse_String_NonSSO_Plain 3802.113575458585 ns/iter 3617.4439965300903 ns/iter 1.05
JSON_Parse_String_SSO_Plain 1995.4815764016978 ns/iter 2024.0991612547166 ns/iter 0.99
JSON_Parse_String_Escape_Heavy 19199.52088457914 ns/iter 16592.888936464435 ns/iter 1.16
JSON_Parse_Object_Short_Keys 6714.374317549251 ns/iter 5408.520974861105 ns/iter 1.24
JSON_Parse_Object_Scalar_Properties 2993.818260425908 ns/iter 2896.5976098665774 ns/iter 1.03
JSON_Parse_Object_Array_Properties 3733.0354046057014 ns/iter 3756.1278632371263 ns/iter 0.99
JSON_Parse_Object_Object_Properties 4165.601941747812 ns/iter 3815.613675522108 ns/iter 1.09
JSON_Parse_Nested_Containers 31859.326608901367 ns/iter 28542.669786659117 ns/iter 1.12
JSON_From_String_Copy 28.012859356473715 ns/iter 25.062844601815936 ns/iter 1.12
JSON_From_String_Temporary 21.092340772206065 ns/iter 19.78462608402292 ns/iter 1.07
JSON_Number_To_Double 37.11698656404455 ns/iter 35.400289477415505 ns/iter 1.05
JSON_Object_At_Last_Key/8 3.868695109385548 ns/iter 3.765048388534835 ns/iter 1.03
JSON_Object_At_Last_Key/32 13.452255672480392 ns/iter 12.050196549727884 ns/iter 1.12
JSON_Object_At_Last_Key/128 57.059010710011336 ns/iter 54.357933579917635 ns/iter 1.05
JSON_Object_At_Last_Key/512 200.36567496876526 ns/iter 188.92233560180597 ns/iter 1.06
JSON_Fast_Hash_Helm_Chart_Lock 61.50816312160368 ns/iter 60.89381579831928 ns/iter 1.01
JSON_Equality_Helm_Chart_Lock 140.12055012458353 ns/iter 136.6424110329319 ns/iter 1.03
JSON_Divisible_By_Decimal 194.0813771012773 ns/iter 191.7806086919158 ns/iter 1.01
JSON_String_Equal/10 8.027418367109837 ns/iter 6.929598784891369 ns/iter 1.16
JSON_String_Equal/100 7.3396547870669435 ns/iter 6.634838968283576 ns/iter 1.11
JSON_String_Equal_Small_By_Perfect_Hash/10 0.8695089516609499 ns/iter 0.8368515688206379 ns/iter 1.04
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 4.5044969510557875 ns/iter 3.870965820789016 ns/iter 1.16
JSON_String_Fast_Hash/10 2.757989925120057 ns/iter 2.415402516325088 ns/iter 1.14
JSON_String_Fast_Hash/100 2.241323516904522 ns/iter 2.0817758337299432 ns/iter 1.08
JSON_String_Key_Hash/10 1.534911895239637 ns/iter 1.7950058301584957 ns/iter 0.86
JSON_String_Key_Hash/100 2.6388639541055925 ns/iter 2.432959005761811 ns/iter 1.08
JSON_Object_Defines_Miss_Same_Length 2.690140138902486 ns/iter 2.532073977781492 ns/iter 1.06
JSON_Object_Defines_Miss_Too_Small 2.7549918550796515 ns/iter 2.543949854373645 ns/iter 1.08
JSON_Object_Defines_Miss_Too_Large 2.8018760120351875 ns/iter 2.780987613211015 ns/iter 1.01
Pointer_Object_Traverse 14.298644642386817 ns/iter 14.949166532650288 ns/iter 0.96
Pointer_Object_Try_Traverse 28.11421553589415 ns/iter 27.45479682156383 ns/iter 1.02
Pointer_Push_Back_Pointer_To_Weak_Pointer 168.94664110152033 ns/iter 165.74048049821909 ns/iter 1.02
Pointer_Walker_Schema_ISO_Language 2864568.8214286985 ns/iter 2962969.581749124 ns/iter 0.97
Pointer_Maybe_Tracked_Deeply_Nested/0 940305.6089743482 ns/iter 990950.2461321892 ns/iter 0.95
Pointer_Maybe_Tracked_Deeply_Nested/1 1468151.1500000474 ns/iter 1329094.114786132 ns/iter 1.10
Pointer_Position_Tracker_Get_Deeply_Nested 389.3190283982379 ns/iter 372.2091498003822 ns/iter 1.05
URITemplateRouter_Create 23978.896555763484 ns/iter 23809.189367200517 ns/iter 1.01
URITemplateRouter_Match 169.325453187857 ns/iter 165.62426401669404 ns/iter 1.02
URITemplateRouter_Match_BasePath 199.46778020948238 ns/iter 194.4936436460432 ns/iter 1.03
URITemplateRouterView_Restore 10307.592718894275 ns/iter 10006.430571934678 ns/iter 1.03
URITemplateRouterView_Match 134.37516496498782 ns/iter 146.3338427448409 ns/iter 0.92
URITemplateRouterView_Match_BasePath 156.50814472907595 ns/iter 151.20178315201852 ns/iter 1.04
URITemplateRouterView_Arguments 428.5787353147432 ns/iter 405.8432079790182 ns/iter 1.06
JSONL_Parse_Large 13335493.596153688 ns/iter 12767953.781818422 ns/iter 1.04
JSONL_Parse_Large_GZIP 14386834.13461534 ns/iter 13930930.000001354 ns/iter 1.03
HTML_Build_Table_100000 71902273.11111307 ns/iter 66516499.99999639 ns/iter 1.08
HTML_Render_Table_100000 4236881.429530373 ns/iter 4016841.025640926 ns/iter 1.05
GZIP_Compress_ISO_Language_Set_3_Locations 28493217.041666225 ns/iter 27666538.461538985 ns/iter 1.03
GZIP_Decompress_ISO_Language_Set_3_Locations 6154356.445312814 ns/iter 6836011.956521243 ns/iter 0.90
GZIP_Compress_ISO_Language_Set_3_Schema 1648067.6160716612 ns/iter 1556044.3585748104 ns/iter 1.06
GZIP_Decompress_ISO_Language_Set_3_Schema 301245.13275863224 ns/iter 280203.70938127476 ns/iter 1.08

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions 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.

Benchmark (linux/llvm)

Details
Benchmark suite Current: efffce6 Previous: eb361a9 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.181532245292195 ns/iter 2.5088185531204013 ns/iter 0.87
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.177728224552023 ns/iter 2.4632341930339408 ns/iter 0.88
Regex_Period_Asterisk 2.1785079269695036 ns/iter 2.4609634847670865 ns/iter 0.89
Regex_Group_Period_Asterisk_Group 2.1910778547765393 ns/iter 2.4601912942345705 ns/iter 0.89
Regex_Period_Plus 2.801692514334892 ns/iter 3.873918478949037 ns/iter 0.72
Regex_Period 2.491517527434936 ns/iter 3.5138419575738586 ns/iter 0.71
Regex_Caret_Period_Plus_Dollar 2.489470700169914 ns/iter 3.5155061691340244 ns/iter 0.71
Regex_Caret_Group_Period_Plus_Group_Dollar 2.8029646150937837 ns/iter 3.86768468518438 ns/iter 0.72
Regex_Caret_Period_Asterisk_Dollar 3.422023878328341 ns/iter 2.813738175004624 ns/iter 1.22
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.112507717404587 ns/iter 2.461478825471886 ns/iter 1.26
Regex_Caret_X_Hyphen 6.539617477740507 ns/iter 6.68063726949272 ns/iter 0.98
Regex_Period_Md_Dollar 27.442671252595296 ns/iter 27.291596317485144 ns/iter 1.01
Regex_Caret_Slash_Period_Asterisk 7.1546402297851275 ns/iter 7.603717741343694 ns/iter 0.94
Regex_Caret_Period_Range_Dollar 3.423122231615356 ns/iter 3.5163697668268483 ns/iter 0.97
Regex_Nested_Backtrack 37.15141304852331 ns/iter 37.80038636551075 ns/iter 0.98
JSON_Array_Of_Objects_Unique 476.98107027847107 ns/iter 498.4950051526385 ns/iter 0.96
JSON_Parse_1 4781.890301730188 ns/iter 4571.268674463109 ns/iter 1.05
JSON_Parse_Real 5353.234510892081 ns/iter 5217.337243248212 ns/iter 1.03
JSON_Parse_Decimal 7670.314181537135 ns/iter 7430.806292144088 ns/iter 1.03
JSON_Parse_Schema_ISO_Language 3438769.9656863287 ns/iter 3477565.0899996436 ns/iter 0.99
JSON_Parse_Integer 3890.685494187558 ns/iter 3955.7120275896964 ns/iter 0.98
JSON_Parse_String_NonSSO_Plain 5067.793393935473 ns/iter 5074.820500616058 ns/iter 1.00
JSON_Parse_String_SSO_Plain 2809.9845853600464 ns/iter 2734.7381072349885 ns/iter 1.03
JSON_Parse_String_Escape_Heavy 14314.214461909642 ns/iter 14541.531250645156 ns/iter 0.98
JSON_Parse_Object_Short_Keys 7742.386501567753 ns/iter 7851.92425191205 ns/iter 0.99
JSON_Parse_Object_Scalar_Properties 4017.886755499292 ns/iter 4089.749571653568 ns/iter 0.98
JSON_Parse_Object_Array_Properties 5402.169654429902 ns/iter 5496.281122569987 ns/iter 0.98
JSON_Parse_Object_Object_Properties 5482.6724366258795 ns/iter 5613.01503867656 ns/iter 0.98
JSON_Parse_Nested_Containers 44504.549680196586 ns/iter 44565.544627518626 ns/iter 1.00
JSON_From_String_Copy 19.328153660900767 ns/iter 21.111214843917725 ns/iter 0.92
JSON_From_String_Temporary 17.159478821577032 ns/iter 18.30360607232919 ns/iter 0.94
JSON_Number_To_Double 24.01754417400364 ns/iter 22.942147670718025 ns/iter 1.05
JSON_Object_At_Last_Key/8 3.7194720359954614 ns/iter 3.9551191954104077 ns/iter 0.94
JSON_Object_At_Last_Key/32 11.970839172488114 ns/iter 13.020783843537991 ns/iter 0.92
JSON_Object_At_Last_Key/128 48.27608244937885 ns/iter 46.88595671774934 ns/iter 1.03
JSON_Object_At_Last_Key/512 381.75846708831835 ns/iter 368.0635866847323 ns/iter 1.04
JSON_Fast_Hash_Helm_Chart_Lock 57.216331179943865 ns/iter 68.57774443168591 ns/iter 0.83
JSON_Equality_Helm_Chart_Lock 184.33419797859162 ns/iter 190.79351901703834 ns/iter 0.97
JSON_Divisible_By_Decimal 257.4737775297045 ns/iter 257.346718025424 ns/iter 1.00
JSON_String_Equal/10 6.564352826831576 ns/iter 6.3300493914612685 ns/iter 1.04
JSON_String_Equal/100 7.16977296385015 ns/iter 7.038506045800025 ns/iter 1.02
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9353308635375225 ns/iter 1.0565556498325503 ns/iter 0.89
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.933686682402401 ns/iter 12.346432844093213 ns/iter 1.21
JSON_String_Fast_Hash/10 2.1811699607650525 ns/iter 2.111280390986919 ns/iter 1.03
JSON_String_Fast_Hash/100 2.180004463360706 ns/iter 2.1172057603956906 ns/iter 1.03
JSON_String_Key_Hash/10 2.7317731861147254 ns/iter 2.462918240390845 ns/iter 1.11
JSON_String_Key_Hash/100 9.028677276630477 ns/iter 7.738364471266381 ns/iter 1.17
JSON_Object_Defines_Miss_Same_Length 2.659356633483479 ns/iter 2.923850445149126 ns/iter 0.91
JSON_Object_Defines_Miss_Too_Small 3.73721383394895 ns/iter 4.222291877516078 ns/iter 0.89
JSON_Object_Defines_Miss_Too_Large 2.7777977562297638 ns/iter 2.91872821193456 ns/iter 0.95
Pointer_Object_Traverse 24.1447255199939 ns/iter 25.5226631570309 ns/iter 0.95
Pointer_Object_Try_Traverse 30.22608382783334 ns/iter 30.62235203430824 ns/iter 0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer 230.79936642897093 ns/iter 165.89435137003693 ns/iter 1.39
Pointer_Walker_Schema_ISO_Language 1754153.974937317 ns/iter 1801931.3153847458 ns/iter 0.97
Pointer_Maybe_Tracked_Deeply_Nested/0 1222505.2811950848 ns/iter 1272377.1005385371 ns/iter 0.96
Pointer_Maybe_Tracked_Deeply_Nested/1 1671937.7914690352 ns/iter 2142370.8240741203 ns/iter 0.78
Pointer_Position_Tracker_Get_Deeply_Nested 668.5532934228787 ns/iter 758.8061281163646 ns/iter 0.88
URITemplateRouter_Create 31776.68955345841 ns/iter 29350.026166191947 ns/iter 1.08
URITemplateRouter_Match 170.64892576016246 ns/iter 177.05819209278295 ns/iter 0.96
URITemplateRouter_Match_BasePath 195.55493969739064 ns/iter 211.06588496359825 ns/iter 0.93
URITemplateRouterView_Restore 7913.879083358162 ns/iter 8700.847890934321 ns/iter 0.91
URITemplateRouterView_Match 144.66758586545546 ns/iter 145.1360050547133 ns/iter 1.00
URITemplateRouterView_Match_BasePath 163.65317781484552 ns/iter 164.28460995385092 ns/iter 1.00
URITemplateRouterView_Arguments 438.9021767259099 ns/iter 456.54208574407676 ns/iter 0.96
JSONL_Parse_Large 9832101.436618552 ns/iter 9176915.223684702 ns/iter 1.07
JSONL_Parse_Large_GZIP 11423795.803278182 ns/iter 10827722.584615285 ns/iter 1.06
HTML_Build_Table_100000 69337418.60000283 ns/iter 72279597.80000219 ns/iter 0.96
HTML_Render_Table_100000 5425994.551181813 ns/iter 5204662.880596821 ns/iter 1.04
GZIP_Compress_ISO_Language_Set_3_Locations 33638318.28571186 ns/iter 35971272.6315796 ns/iter 0.94
GZIP_Decompress_ISO_Language_Set_3_Locations 4372681.487500073 ns/iter 4263763.579268143 ns/iter 1.03
GZIP_Compress_ISO_Language_Set_3_Schema 1935638.1580381244 ns/iter 2134575.9359759283 ns/iter 0.91
GZIP_Decompress_ISO_Language_Set_3_Schema 353092.1108312092 ns/iter 274405.27686274116 ns/iter 1.29

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions 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.

Benchmark (linux/gcc)

Details
Benchmark suite Current: efffce6 Previous: eb361a9 Ratio
GZIP_Compress_ISO_Language_Set_3_Locations 36244471.684211165 ns/iter 31594713.363633987 ns/iter 1.15
GZIP_Decompress_ISO_Language_Set_3_Locations 4353866.012499453 ns/iter 4841428.737226221 ns/iter 0.90
GZIP_Compress_ISO_Language_Set_3_Schema 2016999.074927791 ns/iter 2016469.2289855352 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Schema 381282.50136093603 ns/iter 345965.11861041974 ns/iter 1.10
HTML_Build_Table_100000 60521071.08333378 ns/iter 58779859.16666735 ns/iter 1.03
HTML_Render_Table_100000 1932992.999999783 ns/iter 3107340.933628313 ns/iter 0.62
JSONL_Parse_Large 13034107.09259104 ns/iter 12525801.517857159 ns/iter 1.04
JSONL_Parse_Large_GZIP 14546613.687500099 ns/iter 13842619.294118598 ns/iter 1.05
URITemplateRouter_Create 30881.914661027295 ns/iter 28273.031196937332 ns/iter 1.09
URITemplateRouter_Match 148.86728797588017 ns/iter 138.09750796142646 ns/iter 1.08
URITemplateRouter_Match_BasePath 171.59348698964288 ns/iter 158.53714234786003 ns/iter 1.08
URITemplateRouterView_Restore 7715.838385674816 ns/iter 3514.903130268841 ns/iter 2.20
URITemplateRouterView_Match 121.84607959944 ns/iter 120.55369355261537 ns/iter 1.01
URITemplateRouterView_Match_BasePath 142.05292010796813 ns/iter 134.65699284220096 ns/iter 1.05
URITemplateRouterView_Arguments 468.51671901799676 ns/iter 529.4722287404741 ns/iter 0.88
Pointer_Object_Traverse 29.634280906181626 ns/iter 29.895300697258342 ns/iter 0.99
Pointer_Object_Try_Traverse 23.077742174423015 ns/iter 24.511668004854894 ns/iter 0.94
Pointer_Push_Back_Pointer_To_Weak_Pointer 147.69554354678468 ns/iter 155.732578589409 ns/iter 0.95
Pointer_Walker_Schema_ISO_Language 2097028.9971096385 ns/iter 1750316.4734178057 ns/iter 1.20
Pointer_Maybe_Tracked_Deeply_Nested/0 1555836.8859060558 ns/iter 1501287.9871521238 ns/iter 1.04
Pointer_Maybe_Tracked_Deeply_Nested/1 1684312.3132530418 ns/iter 1911087.4132232275 ns/iter 0.88
Pointer_Position_Tracker_Get_Deeply_Nested 561.615309403052 ns/iter 580.9618955969912 ns/iter 0.97
JSON_Array_Of_Objects_Unique 375.27024454904966 ns/iter 315.11744783880084 ns/iter 1.19
JSON_Parse_1 7794.570664944528 ns/iter 6862.0409986373625 ns/iter 1.14
JSON_Parse_Real 6683.891782154236 ns/iter 5904.892277910968 ns/iter 1.13
JSON_Parse_Decimal 11217.09132668677 ns/iter 9141.094923692139 ns/iter 1.23
JSON_Parse_Schema_ISO_Language 5237196.242424516 ns/iter 4842172.475862534 ns/iter 1.08
JSON_Parse_Integer 4788.611879938869 ns/iter 4581.004634562592 ns/iter 1.05
JSON_Parse_String_NonSSO_Plain 8431.163691876556 ns/iter 7588.15606098592 ns/iter 1.11
JSON_Parse_String_SSO_Plain 3951.3592970925374 ns/iter 3545.161853899654 ns/iter 1.11
JSON_Parse_String_Escape_Heavy 20451.568539786862 ns/iter 18965.517130826 ns/iter 1.08
JSON_Parse_Object_Short_Keys 13961.08450167588 ns/iter 9787.417406650684 ns/iter 1.43
JSON_Parse_Object_Scalar_Properties 5776.420375344133 ns/iter 5049.61176207811 ns/iter 1.14
JSON_Parse_Object_Array_Properties 9358.560497822466 ns/iter 7770.836372926516 ns/iter 1.20
JSON_Parse_Object_Object_Properties 9544.544593715076 ns/iter 7949.797138477131 ns/iter 1.20
JSON_Parse_Nested_Containers 74345.20666595327 ns/iter 64866.9384643951 ns/iter 1.15
JSON_From_String_Copy 18.38626320292055 ns/iter 16.060034147220613 ns/iter 1.14
JSON_From_String_Temporary 15.439283309697519 ns/iter 13.729080785277755 ns/iter 1.12
JSON_Number_To_Double 28.059188214216825 ns/iter 20.576369963163334 ns/iter 1.36
JSON_Object_At_Last_Key/8 5.924821618880235 ns/iter 6.061404410557249 ns/iter 0.98
JSON_Object_At_Last_Key/32 21.81944161515035 ns/iter 19.93754924196469 ns/iter 1.09
JSON_Object_At_Last_Key/128 87.63516855677115 ns/iter 83.16339080879992 ns/iter 1.05
JSON_Object_At_Last_Key/512 423.0087328517104 ns/iter 304.1297042072754 ns/iter 1.39
JSON_Fast_Hash_Helm_Chart_Lock 62.316086211811985 ns/iter 49.13038650657747 ns/iter 1.27
JSON_Equality_Helm_Chart_Lock 166.77023202076126 ns/iter 135.35925652927156 ns/iter 1.23
JSON_Divisible_By_Decimal 236.35524520845843 ns/iter 255.51954456189245 ns/iter 0.92
JSON_String_Equal/10 6.576569090622449 ns/iter 4.931571295492314 ns/iter 1.33
JSON_String_Equal/100 6.270839717476302 ns/iter 6.087607536127906 ns/iter 1.03
JSON_String_Equal_Small_By_Perfect_Hash/10 0.6242886494495197 ns/iter 0.8250506811559375 ns/iter 0.76
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 25.206462279969557 ns/iter 17.01529169252047 ns/iter 1.48
JSON_String_Fast_Hash/10 0.9350028986267748 ns/iter 1.1522776115141398 ns/iter 0.81
JSON_String_Fast_Hash/100 0.9358277601448715 ns/iter 1.1523929557566104 ns/iter 0.81
JSON_String_Key_Hash/10 1.2462238271953507 ns/iter 1.4406655074831183 ns/iter 0.87
JSON_String_Key_Hash/100 12.444907938517968 ns/iter 11.819156855730945 ns/iter 1.05
JSON_Object_Defines_Miss_Same_Length 3.448062453040943 ns/iter 3.6550593610331488 ns/iter 0.94
JSON_Object_Defines_Miss_Too_Small 3.426746076646345 ns/iter 3.3154017126282307 ns/iter 1.03
JSON_Object_Defines_Miss_Too_Large 3.113011220347107 ns/iter 3.417605814149951 ns/iter 0.91
Regex_Lower_S_Or_Upper_S_Asterisk 0.9350085132291596 ns/iter 1.151825579709687 ns/iter 0.81
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.634121100320832 ns/iter 0.8642202590155604 ns/iter 0.73
Regex_Period_Asterisk 0.6230540697967782 ns/iter 0.8640552454970213 ns/iter 0.72
Regex_Group_Period_Asterisk_Group 0.9358143335331276 ns/iter 1.152512296051464 ns/iter 0.81
Regex_Period_Plus 0.9338760354594268 ns/iter 1.153271701262283 ns/iter 0.81
Regex_Period 0.6228775644275557 ns/iter 0.8643182386076022 ns/iter 0.72
Regex_Caret_Period_Plus_Dollar 0.6254461553720143 ns/iter 0.8641019914394725 ns/iter 0.72
Regex_Caret_Group_Period_Plus_Group_Dollar 0.9346897847080998 ns/iter 1.1516343525837296 ns/iter 0.81
Regex_Caret_Period_Asterisk_Dollar 0.9345786143661835 ns/iter 1.1518534596937346 ns/iter 0.81
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.6232788087368308 ns/iter 0.864601480130705 ns/iter 0.72
Regex_Caret_X_Hyphen 4.671121025240077 ns/iter 3.1673756749340463 ns/iter 1.47
Regex_Period_Md_Dollar 29.029596271857184 ns/iter 24.423651323093058 ns/iter 1.19
Regex_Caret_Slash_Period_Asterisk 4.35735273670489 ns/iter 3.1678507509503193 ns/iter 1.38
Regex_Caret_Period_Range_Dollar 0.7790075022333578 ns/iter 0.8648340659040099 ns/iter 0.90
Regex_Nested_Backtrack 36.73643819118369 ns/iter 33.65493269209927 ns/iter 1.09

This comment was automatically generated by workflow using github-action-benchmark.

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