Skip to content

Implement a jsonld_is_expanded helper#2545

Merged
jviotti merged 2 commits into
mainfrom
is-expanded
Jun 28, 2026
Merged

Implement a jsonld_is_expanded helper#2545
jviotti merged 2 commits into
mainfrom
is-expanded

Conversation

@jviotti

@jviotti jviotti commented Jun 27, 2026

Copy link
Copy Markdown
Member

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

Review in cubic

@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: 27cf159 Previous: a131a9b Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.1987023001602437 ns/iter 2.485727574102017 ns/iter 0.88
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.1886464776688386 ns/iter 2.4606735595252687 ns/iter 0.89
Regex_Period_Asterisk 2.2236005250274684 ns/iter 2.460269967045385 ns/iter 0.90
Regex_Group_Period_Asterisk_Group 2.19702033670415 ns/iter 2.460324203006147 ns/iter 0.89
Regex_Period_Plus 2.503562586623133 ns/iter 3.5133526722308654 ns/iter 0.71
Regex_Period 2.4906123217581175 ns/iter 2.7583104257483075 ns/iter 0.90
Regex_Caret_Period_Plus_Dollar 2.8008993574731598 ns/iter 2.4668268290261275 ns/iter 1.14
Regex_Caret_Group_Period_Plus_Group_Dollar 2.800730387265899 ns/iter 2.4614818038636406 ns/iter 1.14
Regex_Caret_Period_Asterisk_Dollar 3.1109423857844978 ns/iter 2.4622747935121048 ns/iter 1.26
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.115622623199701 ns/iter 2.4647633338558217 ns/iter 1.26
Regex_Caret_X_Hyphen 6.85725657260011 ns/iter 7.392628193539571 ns/iter 0.93
Regex_Period_Md_Dollar 31.996991248872142 ns/iter 26.386981606777308 ns/iter 1.21
Regex_Caret_Slash_Period_Asterisk 5.613899122782687 ns/iter 7.16114413341883 ns/iter 0.78
Regex_Caret_Period_Range_Dollar 2.801187113259068 ns/iter 2.4635939791985217 ns/iter 1.14
Regex_Nested_Backtrack 59.52202959638684 ns/iter 37.28069052552831 ns/iter 1.60
JSON_Array_Of_Objects_Unique 403.50366777133587 ns/iter 439.9019174839522 ns/iter 0.92
JSON_Parse_1 4929.088168129676 ns/iter 4646.56101579464 ns/iter 1.06
JSON_Parse_Real 5393.446290728385 ns/iter 5315.772636068033 ns/iter 1.01
JSON_Parse_Decimal 7671.9531795411385 ns/iter 7678.679390481959 ns/iter 1.00
JSON_Parse_Schema_ISO_Language 3428995.4999997453 ns/iter 3620274.0257735546 ns/iter 0.95
JSON_Parse_Integer 3753.1784607799814 ns/iter 3891.663696249949 ns/iter 0.96
JSON_Parse_String_NonSSO_Plain 4980.297409355693 ns/iter 5022.559102404449 ns/iter 0.99
JSON_Parse_String_SSO_Plain 2761.048599546802 ns/iter 2781.3092113367584 ns/iter 0.99
JSON_Parse_String_Escape_Heavy 14019.655075132467 ns/iter 14139.803513796305 ns/iter 0.99
JSON_Parse_Object_Short_Keys 11566.909225994908 ns/iter 7889.771265945556 ns/iter 1.47
JSON_Parse_Object_Scalar_Properties 4139.7794896961495 ns/iter 4089.9648828062636 ns/iter 1.01
JSON_Parse_Object_Array_Properties 5518.953017600566 ns/iter 5607.652400446062 ns/iter 0.98
JSON_Parse_Object_Object_Properties 5665.534634794954 ns/iter 5584.684530827203 ns/iter 1.01
JSON_Parse_Nested_Containers 44729.03405178048 ns/iter 44297.59626345953 ns/iter 1.01
JSON_From_String_Copy 19.61572080156855 ns/iter 20.75765564781823 ns/iter 0.94
JSON_From_String_Temporary 17.17871225906103 ns/iter 17.95819287298603 ns/iter 0.96
JSON_Number_To_Double 22.777889551779957 ns/iter 22.841724917360004 ns/iter 1.00
JSON_Object_At_Last_Key/8 3.4664936268755047 ns/iter 4.699561044217668 ns/iter 0.74
JSON_Object_At_Last_Key/32 11.850598607782345 ns/iter 13.549642415253668 ns/iter 0.87
JSON_Object_At_Last_Key/128 48.895960978589684 ns/iter 47.2756156408613 ns/iter 1.03
JSON_Object_At_Last_Key/512 386.68907374054623 ns/iter 366.26033285940287 ns/iter 1.06
JSON_Fast_Hash_Helm_Chart_Lock 56.6408507393777 ns/iter 68.56057036224955 ns/iter 0.83
JSON_Equality_Helm_Chart_Lock 170.27709981527445 ns/iter 173.89116756844294 ns/iter 0.98
JSON_Divisible_By_Decimal 254.06683307682607 ns/iter 257.320441361344 ns/iter 0.99
JSON_String_Equal/10 6.854632639190655 ns/iter 7.388668765415949 ns/iter 0.93
JSON_String_Equal/100 7.476862440040746 ns/iter 7.386167704459534 ns/iter 1.01
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9491683106176844 ns/iter 1.054641031663969 ns/iter 0.90
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 10.589694647460142 ns/iter 12.424133895486133 ns/iter 0.85
JSON_String_Fast_Hash/10 2.1819090875439704 ns/iter 2.1101034889653856 ns/iter 1.03
JSON_String_Fast_Hash/100 2.180566799282716 ns/iter 2.1117524907116607 ns/iter 1.03
JSON_String_Key_Hash/10 2.181823327626253 ns/iter 2.4613936297928665 ns/iter 0.89
JSON_String_Key_Hash/100 6.539622620303648 ns/iter 7.731758652744858 ns/iter 0.85
JSON_Object_Defines_Miss_Same_Length 2.882485142591264 ns/iter 2.932858014474123 ns/iter 0.98
JSON_Object_Defines_Miss_Too_Small 2.6805169820942965 ns/iter 2.9044497677394503 ns/iter 0.92
JSON_Object_Defines_Miss_Too_Large 2.6871534448662295 ns/iter 2.9523757864535165 ns/iter 0.91
Pointer_Object_Traverse 24.78531493434594 ns/iter 25.54076577877636 ns/iter 0.97
Pointer_Object_Try_Traverse 29.38460153400412 ns/iter 30.623937638927618 ns/iter 0.96
Pointer_Push_Back_Pointer_To_Weak_Pointer 158.29152156410134 ns/iter 168.72844033254052 ns/iter 0.94
Pointer_Walker_Schema_ISO_Language 1698550.0333335255 ns/iter 1819436.894179874 ns/iter 0.93
Pointer_Maybe_Tracked_Deeply_Nested/0 1244952.8024910423 ns/iter 1281209.8597448738 ns/iter 0.97
Pointer_Maybe_Tracked_Deeply_Nested/1 1763988.8911392668 ns/iter 1936418.7282608624 ns/iter 0.91
Pointer_Position_Tracker_Get_Deeply_Nested 692.4478801191389 ns/iter 710.1040022091325 ns/iter 0.98
URITemplateRouter_Create 32479.362579523768 ns/iter 29820.54323715474 ns/iter 1.09
URITemplateRouter_Match 175.9295021219057 ns/iter 181.00821288186657 ns/iter 0.97
URITemplateRouter_Match_BasePath 206.24002356117163 ns/iter 214.58358615020845 ns/iter 0.96
URITemplateRouterView_Restore 7875.86334820552 ns/iter 8742.174720402185 ns/iter 0.90
URITemplateRouterView_Match 164.58971224091394 ns/iter 170.7081918540311 ns/iter 0.96
URITemplateRouterView_Match_BasePath 188.375117578489 ns/iter 196.81108514368898 ns/iter 0.96
URITemplateRouterView_Arguments 436.61068057678176 ns/iter 452.6655314942806 ns/iter 0.96
JSONL_Parse_Large 10003252.599999866 ns/iter 9063790.493506566 ns/iter 1.10
JSONL_Parse_Large_GZIP 11637462.114754643 ns/iter 10800104.800000554 ns/iter 1.08
HTML_Build_Table_100000 69211478.39999548 ns/iter 72646176.00000949 ns/iter 0.95
HTML_Render_Table_100000 5151009.044117713 ns/iter 5239115.776119623 ns/iter 0.98
GZIP_Compress_ISO_Language_Set_3_Locations 33310247.28571547 ns/iter 35959911.78947076 ns/iter 0.93
GZIP_Decompress_ISO_Language_Set_3_Locations 4108365.5529412096 ns/iter 4281878.576687582 ns/iter 0.96
GZIP_Compress_ISO_Language_Set_3_Schema 1890462.022857134 ns/iter 2132708.8170732106 ns/iter 0.89
GZIP_Decompress_ISO_Language_Set_3_Schema 352862.72401613597 ns/iter 277716.2505919697 ns/iter 1.27
JOSE_VerifySignature_RS256 58034.00307130916 ns/iter 63864.79762773103 ns/iter 0.91
JOSE_VerifySignature_ES512 2418106.5517241065 ns/iter 2659420.015151878 ns/iter 0.91

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

@jviotti jviotti force-pushed the is-expanded branch 2 times, most recently from 27dacc1 to c93ba1c Compare June 27, 2026 20:49

@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: 27cf159 Previous: a131a9b Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.626629441367071 ns/iter 1.5774150375956553 ns/iter 1.03
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.6170542564217332 ns/iter 1.5697483241996861 ns/iter 1.03
Regex_Period_Asterisk 1.625218705846246 ns/iter 1.5768717627059414 ns/iter 1.03
Regex_Group_Period_Asterisk_Group 1.5864374569074426 ns/iter 1.566967345094308 ns/iter 1.01
Regex_Period_Plus 1.8843869903052852 ns/iter 1.8822929070763295 ns/iter 1.00
Regex_Period 1.9154930148455462 ns/iter 1.8882006332913015 ns/iter 1.01
Regex_Caret_Period_Plus_Dollar 1.8996376207697907 ns/iter 1.8823407442028148 ns/iter 1.01
Regex_Caret_Group_Period_Plus_Group_Dollar 1.879838040217302 ns/iter 1.896837731064755 ns/iter 0.99
Regex_Caret_Period_Asterisk_Dollar 1.58346356934509 ns/iter 1.684258528332996 ns/iter 0.94
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.5826691309826417 ns/iter 1.5676151818778556 ns/iter 1.01
Regex_Caret_X_Hyphen 5.644055019830623 ns/iter 5.6494781273313714 ns/iter 1.00
Regex_Period_Md_Dollar 15.866480461758892 ns/iter 16.40046761532176 ns/iter 0.97
Regex_Caret_Slash_Period_Asterisk 4.277396782328018 ns/iter 4.0859580286801895 ns/iter 1.05
Regex_Caret_Period_Range_Dollar 1.8959895218606273 ns/iter 1.8826946200226604 ns/iter 1.01
Regex_Nested_Backtrack 23.433097921774912 ns/iter 23.271452786874246 ns/iter 1.01
JSON_Array_Of_Objects_Unique 317.1238275046314 ns/iter 317.37982098303894 ns/iter 1.00
JSON_Parse_1 4890.540217951223 ns/iter 4757.39778156569 ns/iter 1.03
JSON_Parse_Real 5569.850912196181 ns/iter 5630.74480636025 ns/iter 0.99
JSON_Parse_Decimal 6169.586037144869 ns/iter 6087.036981020318 ns/iter 1.01
JSON_Parse_Schema_ISO_Language 2929134.995935055 ns/iter 2912176.020408322 ns/iter 1.01
JSON_Parse_Integer 4058.9104500429657 ns/iter 3882.708629423568 ns/iter 1.05
JSON_Parse_String_NonSSO_Plain 5783.256569457994 ns/iter 4993.370077668693 ns/iter 1.16
JSON_Parse_String_SSO_Plain 2443.3333240463303 ns/iter 2159.672178239757 ns/iter 1.13
JSON_Parse_String_Escape_Heavy 18856.19045339621 ns/iter 17873.044260872317 ns/iter 1.06
JSON_Parse_Object_Short_Keys 6670.198362416356 ns/iter 6157.293170579479 ns/iter 1.08
JSON_Parse_Object_Scalar_Properties 3352.330632866924 ns/iter 3265.7528750367187 ns/iter 1.03
JSON_Parse_Object_Array_Properties 4953.9393758835295 ns/iter 5010.722609566266 ns/iter 0.99
JSON_Parse_Object_Object_Properties 5068.662008333653 ns/iter 5125.194375602011 ns/iter 0.99
JSON_Parse_Nested_Containers 40895.94973261452 ns/iter 40954.50140137828 ns/iter 1.00
JSON_From_String_Copy 21.47946700273117 ns/iter 21.331448109999396 ns/iter 1.01
JSON_From_String_Temporary 17.690401873053098 ns/iter 18.46481906022521 ns/iter 0.96
JSON_Number_To_Double 30.09047322312843 ns/iter 34.26960036584768 ns/iter 0.88
JSON_Object_At_Last_Key/8 3.457607205504224 ns/iter 3.729562977893215 ns/iter 0.93
JSON_Object_At_Last_Key/32 11.647853195698952 ns/iter 10.974633612983913 ns/iter 1.06
JSON_Object_At_Last_Key/128 53.172467459992546 ns/iter 50.34206285156615 ns/iter 1.06
JSON_Object_At_Last_Key/512 254.16601312596518 ns/iter 172.9691740690368 ns/iter 1.47
JSON_Fast_Hash_Helm_Chart_Lock 56.47519887677712 ns/iter 54.51127579270581 ns/iter 1.04
JSON_Equality_Helm_Chart_Lock 129.3287778454655 ns/iter 124.06739540008647 ns/iter 1.04
JSON_Divisible_By_Decimal 163.59452348710047 ns/iter 164.50946605449334 ns/iter 0.99
JSON_String_Equal/10 6.312089251667838 ns/iter 6.285773663405885 ns/iter 1.00
JSON_String_Equal/100 6.021984384000334 ns/iter 6.047572213363342 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.32006783064992744 ns/iter 0.31360197215526386 ns/iter 1.02
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.492487002083264 ns/iter 3.460491156571804 ns/iter 1.01
JSON_String_Fast_Hash/10 2.200883161441825 ns/iter 2.2320992802401194 ns/iter 0.99
JSON_String_Fast_Hash/100 1.8837443106944258 ns/iter 2.039349894118444 ns/iter 0.92
JSON_String_Key_Hash/10 1.888103378898999 ns/iter 1.880921923862386 ns/iter 1.00
JSON_String_Key_Hash/100 2.031049731828178 ns/iter 2.0034030215052616 ns/iter 1.01
JSON_Object_Defines_Miss_Same_Length 2.636621010938728 ns/iter 2.5083910245523073 ns/iter 1.05
JSON_Object_Defines_Miss_Too_Small 2.6536935662495944 ns/iter 2.5673024835741955 ns/iter 1.03
JSON_Object_Defines_Miss_Too_Large 2.5928290277085524 ns/iter 2.614675436778605 ns/iter 0.99
Pointer_Object_Traverse 17.369952149228112 ns/iter 17.20478723469537 ns/iter 1.01
Pointer_Object_Try_Traverse 16.885915779551503 ns/iter 19.492979735331073 ns/iter 0.87
Pointer_Push_Back_Pointer_To_Weak_Pointer 165.53108969879275 ns/iter 164.08375058517845 ns/iter 1.01
Pointer_Walker_Schema_ISO_Language 1423862.9756097752 ns/iter 1402659.6660000905 ns/iter 1.02
Pointer_Maybe_Tracked_Deeply_Nested/0 951385.9502075122 ns/iter 941041.610738332 ns/iter 1.01
Pointer_Maybe_Tracked_Deeply_Nested/1 955600.8174387022 ns/iter 975489.846870718 ns/iter 0.98
Pointer_Position_Tracker_Get_Deeply_Nested 315.4295318304343 ns/iter 362.43713032381544 ns/iter 0.87
URITemplateRouter_Create 21265.79092750416 ns/iter 21278.889119545816 ns/iter 1.00
URITemplateRouter_Match 155.81924212194082 ns/iter 154.99577080383975 ns/iter 1.01
URITemplateRouter_Match_BasePath 191.47102454107636 ns/iter 183.57607141362885 ns/iter 1.04
URITemplateRouterView_Restore 9549.545297943185 ns/iter 9540.479408214322 ns/iter 1.00
URITemplateRouterView_Match 131.51989916627727 ns/iter 124.99294482783417 ns/iter 1.05
URITemplateRouterView_Match_BasePath 142.48684299923625 ns/iter 141.19908567588547 ns/iter 1.01
URITemplateRouterView_Arguments 514.8882919267451 ns/iter 512.909664273984 ns/iter 1.00
JSONL_Parse_Large 9276729.453332942 ns/iter 9384109.243243886 ns/iter 0.99
JSONL_Parse_Large_GZIP 10211212.565217055 ns/iter 10366879.970148662 ns/iter 0.98
HTML_Build_Table_100000 33182321.42857185 ns/iter 33424803.571430553 ns/iter 0.99
HTML_Render_Table_100000 1413200.9557345423 ns/iter 2102642.98349083 ns/iter 0.67
GZIP_Compress_ISO_Language_Set_3_Locations 24346233.60714129 ns/iter 26063596.71429053 ns/iter 0.93
GZIP_Decompress_ISO_Language_Set_3_Locations 2964665.100418517 ns/iter 2917958.8888887847 ns/iter 1.02
GZIP_Compress_ISO_Language_Set_3_Schema 1427672.1477731757 ns/iter 1413515.9275655765 ns/iter 1.01
GZIP_Decompress_ISO_Language_Set_3_Schema 257767.0748195789 ns/iter 250887.60242254368 ns/iter 1.03
JOSE_VerifySignature_RS256 21812.427283303325 ns/iter 20163.900656289414 ns/iter 1.08
JOSE_VerifySignature_ES512 1036250.9940298186 ns/iter 1029413.0673501218 ns/iter 1.01

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: 27cf159 Previous: a131a9b Ratio
JOSE_VerifySignature_RS256 22111.355383688337 ns/iter 19086.44409453348 ns/iter 1.16
JOSE_VerifySignature_ES512 575740.7644151519 ns/iter 498428.26562499197 ns/iter 1.16
GZIP_Compress_ISO_Language_Set_3_Locations 36340440.05262862 ns/iter 30099112.95652293 ns/iter 1.21
GZIP_Decompress_ISO_Language_Set_3_Locations 4170408.5454546544 ns/iter 2749813.72941181 ns/iter 1.52
GZIP_Compress_ISO_Language_Set_3_Schema 2012517.5747125468 ns/iter 1751994.7074998755 ns/iter 1.15
GZIP_Decompress_ISO_Language_Set_3_Schema 375988.7542918543 ns/iter 196501.10867732187 ns/iter 1.91
HTML_Build_Table_100000 60203488.16666872 ns/iter 59826286.41667513 ns/iter 1.01
HTML_Render_Table_100000 1927178.0633608205 ns/iter 1874463.6263440046 ns/iter 1.03
JSONL_Parse_Large 13535244.153845182 ns/iter 9538226.79452066 ns/iter 1.42
JSONL_Parse_Large_GZIP 14948054.829787036 ns/iter 10696993.523076624 ns/iter 1.40
URITemplateRouter_Create 30417.63861664051 ns/iter 21953.6881532015 ns/iter 1.39
URITemplateRouter_Match 154.0482261727221 ns/iter 112.11729423915165 ns/iter 1.37
URITemplateRouter_Match_BasePath 178.50859394724003 ns/iter 132.5303017795781 ns/iter 1.35
URITemplateRouterView_Restore 7928.374032847782 ns/iter 6698.537592826937 ns/iter 1.18
URITemplateRouterView_Match 125.38870043508214 ns/iter 93.59958203618649 ns/iter 1.34
URITemplateRouterView_Match_BasePath 142.49461249881836 ns/iter 105.1557097765985 ns/iter 1.36
URITemplateRouterView_Arguments 470.58786654174617 ns/iter 359.31292215455557 ns/iter 1.31
Pointer_Object_Traverse 28.18660478632436 ns/iter 22.891055248656553 ns/iter 1.23
Pointer_Object_Try_Traverse 23.429191088076617 ns/iter 19.369626145014806 ns/iter 1.21
Pointer_Push_Back_Pointer_To_Weak_Pointer 158.30901908126344 ns/iter 133.37165893377278 ns/iter 1.19
Pointer_Walker_Schema_ISO_Language 1848352.464566856 ns/iter 1466480.7594142274 ns/iter 1.26
Pointer_Maybe_Tracked_Deeply_Nested/0 1573122.7309416914 ns/iter 1191783.6444443574 ns/iter 1.32
Pointer_Maybe_Tracked_Deeply_Nested/1 1701509.0121655955 ns/iter 1294673.3493530257 ns/iter 1.31
Pointer_Position_Tracker_Get_Deeply_Nested 588.8035004093331 ns/iter 470.45968186513335 ns/iter 1.25
JSON_Array_Of_Objects_Unique 396.5728238548615 ns/iter 335.2282543477373 ns/iter 1.18
JSON_Parse_1 7596.357397329021 ns/iter 5877.743099805299 ns/iter 1.29
JSON_Parse_Real 6698.571175280878 ns/iter 5070.832150570383 ns/iter 1.32
JSON_Parse_Decimal 11245.952572916052 ns/iter 7385.564579504631 ns/iter 1.52
JSON_Parse_Schema_ISO_Language 5125027.466666594 ns/iter 3959710.6761361673 ns/iter 1.29
JSON_Parse_Integer 4825.964089217681 ns/iter 3752.5543632575373 ns/iter 1.29
JSON_Parse_String_NonSSO_Plain 8494.645692956958 ns/iter 6818.6743800365775 ns/iter 1.25
JSON_Parse_String_SSO_Plain 3877.0834971836866 ns/iter 2935.069976839344 ns/iter 1.32
JSON_Parse_String_Escape_Heavy 21047.736059034487 ns/iter 15421.004981625085 ns/iter 1.36
JSON_Parse_Object_Short_Keys 11145.321693139153 ns/iter 8715.220648579227 ns/iter 1.28
JSON_Parse_Object_Scalar_Properties 5735.331332857261 ns/iter 4447.2823236415925 ns/iter 1.29
JSON_Parse_Object_Array_Properties 8877.700350859688 ns/iter 7068.610308611576 ns/iter 1.26
JSON_Parse_Object_Object_Properties 9204.899581644304 ns/iter 7161.643736024027 ns/iter 1.29
JSON_Parse_Nested_Containers 71706.89914933225 ns/iter 55948.501311260006 ns/iter 1.28
JSON_From_String_Copy 18.229260975745383 ns/iter 15.903135967716445 ns/iter 1.15
JSON_From_String_Temporary 15.372835027581544 ns/iter 12.937462555978884 ns/iter 1.19
JSON_Number_To_Double 20.565956025843203 ns/iter 15.046083049334895 ns/iter 1.37
JSON_Object_At_Last_Key/8 8.108258672726606 ns/iter 7.094627154176891 ns/iter 1.14
JSON_Object_At_Last_Key/32 31.495869717929484 ns/iter 26.753685120230617 ns/iter 1.18
JSON_Object_At_Last_Key/128 126.92122933593512 ns/iter 105.41976686593998 ns/iter 1.20
JSON_Object_At_Last_Key/512 519.5403927253674 ns/iter 433.54431302651864 ns/iter 1.20
JSON_Fast_Hash_Helm_Chart_Lock 61.306615295278974 ns/iter 47.29040005256639 ns/iter 1.30
JSON_Equality_Helm_Chart_Lock 154.85009176219947 ns/iter 119.40822851975932 ns/iter 1.30
JSON_Divisible_By_Decimal 238.70921641624915 ns/iter 179.54975371988246 ns/iter 1.33
JSON_String_Equal/10 6.3147711704315 ns/iter 4.706567714561287 ns/iter 1.34
JSON_String_Equal/100 6.936203078621313 ns/iter 5.526298252505722 ns/iter 1.26
JSON_String_Equal_Small_By_Perfect_Hash/10 0.6237433971673212 ns/iter 0.5528275769307525 ns/iter 1.13
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 25.22429217569989 ns/iter 17.015451939404976 ns/iter 1.48
JSON_String_Fast_Hash/10 1.2465368294743024 ns/iter 1.0910126630511308 ns/iter 1.14
JSON_String_Fast_Hash/100 1.2509096852310146 ns/iter 1.0914368881448395 ns/iter 1.15
JSON_String_Key_Hash/10 1.2481358883416374 ns/iter 0.8406359076548988 ns/iter 1.48
JSON_String_Key_Hash/100 12.446722878560214 ns/iter 11.448052746293751 ns/iter 1.09
JSON_Object_Defines_Miss_Same_Length 3.12052245843391 ns/iter 2.7345748089286044 ns/iter 1.14
JSON_Object_Defines_Miss_Too_Small 3.1438575756656326 ns/iter 2.729410464256369 ns/iter 1.15
JSON_Object_Defines_Miss_Too_Large 3.424743439711066 ns/iter 3.0002444658450123 ns/iter 1.14
Regex_Lower_S_Or_Upper_S_Asterisk 0.6250929062588029 ns/iter 0.5463922153270957 ns/iter 1.14
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.9353755149879592 ns/iter 0.8180287805008292 ns/iter 1.14
Regex_Period_Asterisk 0.9349990478052209 ns/iter 0.8186134151195188 ns/iter 1.14
Regex_Group_Period_Asterisk_Group 0.6252861033228473 ns/iter 0.5458649793219796 ns/iter 1.15
Regex_Period_Plus 0.6231102037089281 ns/iter 0.5458853837184227 ns/iter 1.14
Regex_Period 0.9352223431848736 ns/iter 0.8184116758257539 ns/iter 1.14
Regex_Caret_Period_Plus_Dollar 0.9345398193935044 ns/iter 0.81804282531149 ns/iter 1.14
Regex_Caret_Group_Period_Plus_Group_Dollar 0.6227257769898443 ns/iter 0.5457494661956328 ns/iter 1.14
Regex_Caret_Period_Asterisk_Dollar 0.6251772555813823 ns/iter 0.5459561729730532 ns/iter 1.15
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.935683244304382 ns/iter 0.8202928834749438 ns/iter 1.14
Regex_Caret_X_Hyphen 4.0508442709436805 ns/iter 2.9998049660611517 ns/iter 1.35
Regex_Period_Md_Dollar 28.262413016378307 ns/iter 26.136902255001225 ns/iter 1.08
Regex_Caret_Slash_Period_Asterisk 4.356166076288144 ns/iter 2.999246084995247 ns/iter 1.45
Regex_Caret_Period_Range_Dollar 1.2450691576587318 ns/iter 1.092518953166327 ns/iter 1.14
Regex_Nested_Backtrack 36.56642720141177 ns/iter 29.688361431509176 ns/iter 1.23

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 (windows/msvc)

Details
Benchmark suite Current: 27cf159 Previous: a131a9b Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 5.076808000001165 ns/iter 5.2773930000012115 ns/iter 0.96
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 5.2119569999990745 ns/iter 5.02234400000134 ns/iter 1.04
Regex_Period_Asterisk 5.227551000000403 ns/iter 5.019572000001062 ns/iter 1.04
Regex_Group_Period_Asterisk_Group 5.264746428571649 ns/iter 5.026631999999154 ns/iter 1.05
Regex_Period_Plus 4.940648000001602 ns/iter 4.777459822494302 ns/iter 1.03
Regex_Period 4.776057902851368 ns/iter 4.909834832387301 ns/iter 0.97
Regex_Caret_Period_Plus_Dollar 4.769788706421491 ns/iter 4.923362500000345 ns/iter 0.97
Regex_Caret_Group_Period_Plus_Group_Dollar 4.781792510580678 ns/iter 5.009221000000252 ns/iter 0.95
Regex_Caret_Period_Asterisk_Dollar 5.010676000001695 ns/iter 5.1016950000007455 ns/iter 0.98
Regex_Caret_Group_Period_Asterisk_Group_Dollar 5.239202000000205 ns/iter 5.015300999998544 ns/iter 1.04
Regex_Caret_X_Hyphen 8.162366071428854 ns/iter 8.219092633926348 ns/iter 0.99
Regex_Period_Md_Dollar 44.369156250013475 ns/iter 44.45416096206138 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 7.866065848214682 ns/iter 7.858876116070437 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 5.96544553571375 ns/iter 5.988543999999365 ns/iter 1.00
Regex_Nested_Backtrack 54.17760000000272 ns/iter 53.534267857153445 ns/iter 1.01
JSON_Array_Of_Objects_Unique 501.3100962452914 ns/iter 495.959017857217 ns/iter 1.01
JSON_Parse_1 8695.390199151145 ns/iter 9218.494113863964 ns/iter 0.94
JSON_Parse_Real 15994.618303573863 ns/iter 16112.665178568925 ns/iter 0.99
JSON_Parse_Decimal 11816.132812501934 ns/iter 11825.203571427373 ns/iter 1.00
JSON_Parse_Schema_ISO_Language 8034656.6666675145 ns/iter 7364240.000000184 ns/iter 1.09
JSON_Parse_Integer 6099.906250000231 ns/iter 6195.9482142859615 ns/iter 0.98
JSON_Parse_String_NonSSO_Plain 7953.1607142843295 ns/iter 7688.706473216099 ns/iter 1.03
JSON_Parse_String_SSO_Plain 3714.7283665570917 ns/iter 3544.42225450895 ns/iter 1.05
JSON_Parse_String_Escape_Heavy 21985.984562708138 ns/iter 21859.54062500173 ns/iter 1.01
JSON_Parse_Object_Short_Keys 13135.04999999639 ns/iter 13263.85178571497 ns/iter 0.99
JSON_Parse_Object_Scalar_Properties 6767.91875000049 ns/iter 6867.1004464298285 ns/iter 0.99
JSON_Parse_Object_Array_Properties 11238.326562498458 ns/iter 11426.303124999036 ns/iter 0.98
JSON_Parse_Object_Object_Properties 11456.164062501271 ns/iter 11585.23593749905 ns/iter 0.99
JSON_Parse_Nested_Containers 78515.16741071509 ns/iter 78435.22321428408 ns/iter 1.00
JSON_From_String_Copy 64.98141741071755 ns/iter 64.37129464284145 ns/iter 1.01
JSON_From_String_Temporary 60.46991071428919 ns/iter 59.126839285710275 ns/iter 1.02
JSON_Number_To_Double 119.52107142856708 ns/iter 119.54891071431867 ns/iter 1.00
JSON_Object_At_Last_Key/8 7.274986607144841 ns/iter 7.289612723214235 ns/iter 1.00
JSON_Object_At_Last_Key/32 23.490796428575326 ns/iter 23.332580096729995 ns/iter 1.01
JSON_Object_At_Last_Key/128 90.16212990346932 ns/iter 90.18358258927606 ns/iter 1.00
JSON_Object_At_Last_Key/512 427.3602500001062 ns/iter 428.1795625000484 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 65.78841071428445 ns/iter 67.38622321429538 ns/iter 0.98
JSON_Equality_Helm_Chart_Lock 301.4494642858015 ns/iter 305.03122488493227 ns/iter 0.99
JSON_Divisible_By_Decimal 302.11561583532415 ns/iter 305.26223214286983 ns/iter 0.99
JSON_String_Equal/10 15.186397321431043 ns/iter 15.279918681789244 ns/iter 0.99
JSON_String_Equal/100 16.559969531961094 ns/iter 16.425045202508397 ns/iter 1.01
JSON_String_Equal_Small_By_Perfect_Hash/10 2.506283214285889 ns/iter 2.5408900000002177 ns/iter 0.99
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.210784981200884 ns/iter 15.039591517853928 ns/iter 0.94
JSON_String_Fast_Hash/10 4.820295871611023 ns/iter 4.712607599805638 ns/iter 1.02
JSON_String_Fast_Hash/100 4.717013282303416 ns/iter 4.707441974793598 ns/iter 1.00
JSON_String_Key_Hash/10 5.347953000000416 ns/iter 5.345341964284347 ns/iter 1.00
JSON_String_Key_Hash/100 11.91114107142864 ns/iter 11.883753571428965 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 4.103362953756688 ns/iter 4.129221346658851 ns/iter 0.99
JSON_Object_Defines_Miss_Too_Small 5.031858000002103 ns/iter 5.031277678570843 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 4.4065868865016755 ns/iter 4.4092856250003365 ns/iter 1.00
Pointer_Object_Traverse 70.16224107143135 ns/iter 71.74136607141739 ns/iter 0.98
Pointer_Object_Try_Traverse 71.3651897321453 ns/iter 71.07705357144921 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 185.80399873245167 ns/iter 167.4271808544734 ns/iter 1.11
Pointer_Walker_Schema_ISO_Language 8201021.111110801 ns/iter 7244897.77777914 ns/iter 1.13
Pointer_Maybe_Tracked_Deeply_Nested/0 2401511.24498003 ns/iter 2477217.045454285 ns/iter 0.97
Pointer_Maybe_Tracked_Deeply_Nested/1 3736745.4545451417 ns/iter 3702434.3589751082 ns/iter 1.01
Pointer_Position_Tracker_Get_Deeply_Nested 523.1947486859568 ns/iter 585.9818080356913 ns/iter 0.89
URITemplateRouter_Create 40625.88358191666 ns/iter 40527.71168242241 ns/iter 1.00
URITemplateRouter_Match 234.02987499999028 ns/iter 233.5466926844729 ns/iter 1.00
URITemplateRouter_Match_BasePath 264.9409515598438 ns/iter 265.73873730974975 ns/iter 1.00
URITemplateRouterView_Restore 32363.446428576026 ns/iter 31660.571428570198 ns/iter 1.02
URITemplateRouterView_Match 181.73312377678738 ns/iter 180.67368620579327 ns/iter 1.01
URITemplateRouterView_Match_BasePath 205.54966493079988 ns/iter 205.96566491227338 ns/iter 1.00
URITemplateRouterView_Arguments 532.7800000000025 ns/iter 530.3131250000449 ns/iter 1.00
JSONL_Parse_Large 33425504.76189726 ns/iter 32571945.83333482 ns/iter 1.03
JSONL_Parse_Large_GZIP 33439676.190482713 ns/iter 33063885.714292545 ns/iter 1.01
HTML_Build_Table_100000 88144042.85713603 ns/iter 88983911.11109859 ns/iter 0.99
HTML_Render_Table_100000 8048790.666665203 ns/iter 7598483.333332398 ns/iter 1.06
GZIP_Compress_ISO_Language_Set_3_Locations 36497357.89472767 ns/iter 36468247.36841537 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Locations 9799288.000000766 ns/iter 9929435.937500842 ns/iter 0.99
GZIP_Compress_ISO_Language_Set_3_Schema 2143908.4057973283 ns/iter 2098194.202898926 ns/iter 1.02
GZIP_Decompress_ISO_Language_Set_3_Schema 636498.0357143882 ns/iter 631944.1964285894 ns/iter 1.01
JOSE_VerifySignature_RS256 21229.303124997045 ns/iter 21221.521874998925 ns/iter 1.00
JOSE_VerifySignature_ES512 1542637.9464287267 ns/iter 1587574.107142688 ns/iter 0.97

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

@jviotti jviotti force-pushed the is-expanded branch 2 times, most recently from ab6b8b7 to 5ceb926 Compare June 27, 2026 22:59
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti marked this pull request as ready for review June 27, 2026 23:28
@augmentcode

augmentcode Bot commented Jun 27, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR introduces a new helper for validating whether a JSON document is already in JSON-LD 1.1 expanded document form.

Changes:

  • Added sourcemeta::core::jsonld_is_expanded(const JSON&) to the public JSON-LD API.
  • Implemented expanded-form validation logic covering node objects, value objects, list/set objects, graphs, included blocks, and reverse properties.
  • Registered the new implementation unit in the JSON-LD core CMake target.
  • Added a comprehensive dedicated unit test suite for jsonld_is_expanded.
  • Extended the JSON-LD expansion fixture suite to assert that expansion outputs (and expected fixtures) are valid expanded documents, with explicit exceptions for a few known invalid-IRI fixtures.

Technical Notes: Validation uses URI/IRI checks via URI::is_iri/URI::is_iri_reference and language tag validation via is_langtag.

🤖 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.

Comment thread src/core/jsonld/jsonld_is_expanded.cc Outdated
// A property term in expanded form is an absolute IRI or a blank node
// identifier (JSON-LD 1.1 Section 9, "node object").
auto is_term(const std::string_view value) -> bool {
return URI::is_iri(value) || value.starts_with("_:");

@augmentcode augmentcode Bot Jun 27, 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.

is_term/is_reference treat any string starting with "_:" as a blank node identifier; this would accept malformed values like "_:" (empty label) or other non-conformant labels. If this helper is meant to validate expanded form strictly, consider tightening blank node identifier validation so invalid bnode IDs don't pass.

Severity: medium

Other Locations
  • src/core/jsonld/jsonld_is_expanded.cc:23

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 src/core/jsonld/jsonld_is_expanded.cc Outdated
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti merged commit 618ca6b into main Jun 28, 2026
12 checks passed
@jviotti jviotti deleted the is-expanded branch June 28, 2026 01:31
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