Skip to content

Implement JSON-LD expansion#2543

Merged
jviotti merged 13 commits into
mainfrom
jsonld-expand
Jun 27, 2026
Merged

Implement JSON-LD expansion#2543
jviotti merged 13 commits into
mainfrom
jsonld-expand

Conversation

@jviotti

@jviotti jviotti commented Jun 24, 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 (macos/llvm)

Details
Benchmark suite Current: e362a2e Previous: 9feca28 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.9550838915199167 ns/iter 1.8036231858292582 ns/iter 1.08
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.687286945002483 ns/iter 1.7702137061333802 ns/iter 1.52
Regex_Period_Asterisk 2.3151995589058747 ns/iter 1.8824406341644007 ns/iter 1.23
Regex_Group_Period_Asterisk_Group 1.9816151489149099 ns/iter 1.8061269474087158 ns/iter 1.10
Regex_Period_Plus 2.3208226165182495 ns/iter 2.34058571590554 ns/iter 0.99
Regex_Period 2.5943622311109222 ns/iter 2.156864608636855 ns/iter 1.20
Regex_Caret_Period_Plus_Dollar 3.212980283037106 ns/iter 2.120291924707027 ns/iter 1.52
Regex_Caret_Group_Period_Plus_Group_Dollar 2.591968421361887 ns/iter 2.157682739565728 ns/iter 1.20
Regex_Caret_Period_Asterisk_Dollar 1.9026358900659202 ns/iter 1.9155369202990173 ns/iter 0.99
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.8424413130166377 ns/iter 1.9996987487111502 ns/iter 0.92
Regex_Caret_X_Hyphen 6.990706657846828 ns/iter 6.507210989714814 ns/iter 1.07
Regex_Period_Md_Dollar 19.51590037752963 ns/iter 19.439950225593456 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 5.56917664728535 ns/iter 5.435119826745777 ns/iter 1.02
Regex_Caret_Period_Range_Dollar 2.2647523262639826 ns/iter 2.2333231612519144 ns/iter 1.01
Regex_Nested_Backtrack 28.34026778787598 ns/iter 26.16973999456158 ns/iter 1.08
JSON_Array_Of_Objects_Unique 337.3422664620747 ns/iter 393.8179842767103 ns/iter 0.86
JSON_Parse_1 5572.677267164229 ns/iter 4009.353293061926 ns/iter 1.39
JSON_Parse_Real 6280.00703326569 ns/iter 5713.679673798683 ns/iter 1.10
JSON_Parse_Decimal 7349.068878184877 ns/iter 6370.394651250612 ns/iter 1.15
JSON_Parse_Schema_ISO_Language 3337094.2524269708 ns/iter 3755215.4803922446 ns/iter 0.89
JSON_Parse_Integer 3982.786503332871 ns/iter 3292.7939297811286 ns/iter 1.21
JSON_Parse_String_NonSSO_Plain 5580.3699983252845 ns/iter 4109.7648484121055 ns/iter 1.36
JSON_Parse_String_SSO_Plain 2427.4479733541075 ns/iter 2442.0458622357437 ns/iter 0.99
JSON_Parse_String_Escape_Heavy 21060.840834029703 ns/iter 20220.44487260528 ns/iter 1.04
JSON_Parse_Object_Short_Keys 6924.767942373565 ns/iter 6320.736676715598 ns/iter 1.10
JSON_Parse_Object_Scalar_Properties 3518.7230327695634 ns/iter 2940.16827668627 ns/iter 1.20
JSON_Parse_Object_Array_Properties 6620.342079440771 ns/iter 3936.445216425854 ns/iter 1.68
JSON_Parse_Object_Object_Properties 6032.08684079004 ns/iter 3782.1183939826715 ns/iter 1.59
JSON_Parse_Nested_Containers 45940.1954753673 ns/iter 30043.305876568393 ns/iter 1.53
JSON_From_String_Copy 22.618838931379624 ns/iter 27.048130161678145 ns/iter 0.84
JSON_From_String_Temporary 20.515041395555546 ns/iter 22.290536355997972 ns/iter 0.92
JSON_Number_To_Double 37.65535845574767 ns/iter 35.93156271609285 ns/iter 1.05
JSON_Object_At_Last_Key/8 3.7602572282652 ns/iter 4.262029983235967 ns/iter 0.88
JSON_Object_At_Last_Key/32 12.077782043836006 ns/iter 14.731385248494608 ns/iter 0.82
JSON_Object_At_Last_Key/128 58.048141505647415 ns/iter 60.60862715489799 ns/iter 0.96
JSON_Object_At_Last_Key/512 203.3684428232837 ns/iter 195.8076346850723 ns/iter 1.04
JSON_Fast_Hash_Helm_Chart_Lock 64.20725430362717 ns/iter 61.721206999703156 ns/iter 1.04
JSON_Equality_Helm_Chart_Lock 168.13755494010618 ns/iter 140.52546187764094 ns/iter 1.20
JSON_Divisible_By_Decimal 239.1546699058249 ns/iter 187.47746903505453 ns/iter 1.28
JSON_String_Equal/10 7.4283258146794475 ns/iter 7.085300779327523 ns/iter 1.05
JSON_String_Equal/100 6.953580452725712 ns/iter 6.727307632900233 ns/iter 1.03
JSON_String_Equal_Small_By_Perfect_Hash/10 0.33815017618201887 ns/iter 0.7999730302216185 ns/iter 0.42
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.984775058732103 ns/iter 3.9136467704148927 ns/iter 1.02
JSON_String_Fast_Hash/10 2.4603415804948225 ns/iter 2.619225468843136 ns/iter 0.94
JSON_String_Fast_Hash/100 2.0765183169603763 ns/iter 2.2791211088554326 ns/iter 0.91
JSON_String_Key_Hash/10 2.230243866647065 ns/iter 1.5021886671239775 ns/iter 1.48
JSON_String_Key_Hash/100 2.3275211854730884 ns/iter 2.1826239731519994 ns/iter 1.07
JSON_Object_Defines_Miss_Same_Length 2.7248736521531787 ns/iter 2.4815106540544285 ns/iter 1.10
JSON_Object_Defines_Miss_Too_Small 2.841615185890882 ns/iter 2.4029156941778314 ns/iter 1.18
JSON_Object_Defines_Miss_Too_Large 2.9459726408675437 ns/iter 2.5206734900607537 ns/iter 1.17
Pointer_Object_Traverse 23.88224289641098 ns/iter 14.3967064684814 ns/iter 1.66
Pointer_Object_Try_Traverse 21.343709564744294 ns/iter 24.551391782236568 ns/iter 0.87
Pointer_Push_Back_Pointer_To_Weak_Pointer 161.69582530926002 ns/iter 159.3038738345691 ns/iter 1.02
Pointer_Walker_Schema_ISO_Language 1959154.5220341145 ns/iter 3975800.036529756 ns/iter 0.49
Pointer_Maybe_Tracked_Deeply_Nested/0 1487509.0000000964 ns/iter 1151056.844875322 ns/iter 1.29
Pointer_Maybe_Tracked_Deeply_Nested/1 1310606.0405643354 ns/iter 1502269.7021276304 ns/iter 0.87
Pointer_Position_Tracker_Get_Deeply_Nested 386.40435533401603 ns/iter 373.77004058728096 ns/iter 1.03
URITemplateRouter_Create 26652.168660141397 ns/iter 24891.847365745416 ns/iter 1.07
URITemplateRouter_Match 174.15047793536854 ns/iter 170.49720210726673 ns/iter 1.02
URITemplateRouter_Match_BasePath 209.4728401724428 ns/iter 192.62330334173433 ns/iter 1.09
URITemplateRouterView_Restore 11376.331677555005 ns/iter 9827.277818758092 ns/iter 1.16
URITemplateRouterView_Match 151.0482954698201 ns/iter 151.13774782665595 ns/iter 1.00
URITemplateRouterView_Match_BasePath 208.49562465771297 ns/iter 193.0872433532793 ns/iter 1.08
URITemplateRouterView_Arguments 575.5573879307425 ns/iter 445.1252288874908 ns/iter 1.29
JSONL_Parse_Large 10187931.159420708 ns/iter 15069452.127661068 ns/iter 0.68
JSONL_Parse_Large_GZIP 10669656.07936521 ns/iter 19913093.976742327 ns/iter 0.54
HTML_Build_Table_100000 37456513.15789713 ns/iter 98677046.87499668 ns/iter 0.38
HTML_Render_Table_100000 1656414.861271596 ns/iter 4973258.733333469 ns/iter 0.33
GZIP_Compress_ISO_Language_Set_3_Locations 27347773.148145888 ns/iter 30404472.19047153 ns/iter 0.90
GZIP_Decompress_ISO_Language_Set_3_Locations 3233716.477272579 ns/iter 6912204.670329429 ns/iter 0.47
GZIP_Compress_ISO_Language_Set_3_Schema 1611579.0359712224 ns/iter 1785399.7526879574 ns/iter 0.90
GZIP_Decompress_ISO_Language_Set_3_Schema 286982.7175836879 ns/iter 294287.94366196654 ns/iter 0.98
JOSE_VerifySignature_RS256 23878.487722725575 ns/iter 23656.691320254053 ns/iter 1.01
JOSE_VerifySignature_ES512 1260524.0405186214 ns/iter 1002985.0863421891 ns/iter 1.26

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: e362a2e Previous: 9feca28 Ratio
JOSE_VerifySignature_RS256 22199.20532890065 ns/iter 22058.15104130587 ns/iter 1.01
JOSE_VerifySignature_ES512 576023.0884297662 ns/iter 575933.6507413975 ns/iter 1.00
GZIP_Compress_ISO_Language_Set_3_Locations 36212882.947366826 ns/iter 36465430.105259225 ns/iter 0.99
GZIP_Decompress_ISO_Language_Set_3_Locations 4123271.423529385 ns/iter 4327011.987577167 ns/iter 0.95
GZIP_Compress_ISO_Language_Set_3_Schema 2020860.7312135976 ns/iter 2015752.1666664612 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Schema 375395.90123451327 ns/iter 377919.7479762434 ns/iter 0.99
HTML_Build_Table_100000 59309666.99999847 ns/iter 59868783.33333341 ns/iter 0.99
HTML_Render_Table_100000 1760186.444723626 ns/iter 1830998.1324674399 ns/iter 0.96
JSONL_Parse_Large 13125541.641507657 ns/iter 12953244.518518694 ns/iter 1.01
JSONL_Parse_Large_GZIP 14556318.249998884 ns/iter 14288123.061224462 ns/iter 1.02
URITemplateRouter_Create 31110.58149134308 ns/iter 30384.492051147037 ns/iter 1.02
URITemplateRouter_Match 155.6088420953666 ns/iter 155.52345146304904 ns/iter 1.00
URITemplateRouter_Match_BasePath 181.80045646646914 ns/iter 180.05388145976022 ns/iter 1.01
URITemplateRouterView_Restore 7696.349673452638 ns/iter 7866.865032646923 ns/iter 0.98
URITemplateRouterView_Match 125.49681019902194 ns/iter 125.58203636699173 ns/iter 1.00
URITemplateRouterView_Match_BasePath 142.58555685390206 ns/iter 142.9906905262892 ns/iter 1.00
URITemplateRouterView_Arguments 470.4140274227254 ns/iter 471.6565924763506 ns/iter 1.00
Pointer_Object_Traverse 28.220382216379587 ns/iter 28.2503993604882 ns/iter 1.00
Pointer_Object_Try_Traverse 23.377229908057444 ns/iter 23.26772784484406 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 158.6100762000757 ns/iter 158.59112696080211 ns/iter 1.00
Pointer_Walker_Schema_ISO_Language 1839255.2763157855 ns/iter 1963282.7994505682 ns/iter 0.94
Pointer_Maybe_Tracked_Deeply_Nested/0 1511317.2329670256 ns/iter 1537857.3576159421 ns/iter 0.98
Pointer_Maybe_Tracked_Deeply_Nested/1 1778810.5304565746 ns/iter 1694886.033980591 ns/iter 1.05
Pointer_Position_Tracker_Get_Deeply_Nested 623.6381779909509 ns/iter 503.34925813103723 ns/iter 1.24
JSON_Array_Of_Objects_Unique 409.7053700713709 ns/iter 419.528614305926 ns/iter 0.98
JSON_Parse_1 7757.836951705371 ns/iter 7592.562176839454 ns/iter 1.02
JSON_Parse_Real 6719.097801109811 ns/iter 6560.5392430003185 ns/iter 1.02
JSON_Parse_Decimal 11286.883568833797 ns/iter 11267.756214903908 ns/iter 1.00
JSON_Parse_Schema_ISO_Language 5114639.691176053 ns/iter 5199371.762962444 ns/iter 0.98
JSON_Parse_Integer 4803.079717450073 ns/iter 4799.1040024689155 ns/iter 1.00
JSON_Parse_String_NonSSO_Plain 8691.091886679755 ns/iter 8580.763283249553 ns/iter 1.01
JSON_Parse_String_SSO_Plain 3888.835625638017 ns/iter 3863.173541916256 ns/iter 1.01
JSON_Parse_String_Escape_Heavy 21358.1439878697 ns/iter 21014.664098472345 ns/iter 1.02
JSON_Parse_Object_Short_Keys 11222.892486215633 ns/iter 13775.715427627101 ns/iter 0.81
JSON_Parse_Object_Scalar_Properties 5771.459247041708 ns/iter 5699.024728143731 ns/iter 1.01
JSON_Parse_Object_Array_Properties 10293.554184802379 ns/iter 9014.629840634076 ns/iter 1.14
JSON_Parse_Object_Object_Properties 10392.878694754994 ns/iter 9163.480860304668 ns/iter 1.13
JSON_Parse_Nested_Containers 75489.4086569754 ns/iter 72174.14960468112 ns/iter 1.05
JSON_From_String_Copy 18.370443934362257 ns/iter 18.23795866308025 ns/iter 1.01
JSON_From_String_Temporary 15.360782748607829 ns/iter 15.353676615140545 ns/iter 1.00
JSON_Number_To_Double 20.61173962057278 ns/iter 20.582509655555352 ns/iter 1.00
JSON_Object_At_Last_Key/8 8.14010117644772 ns/iter 8.160514676027192 ns/iter 1.00
JSON_Object_At_Last_Key/32 31.494383875018343 ns/iter 31.48812994561223 ns/iter 1.00
JSON_Object_At_Last_Key/128 127.61398137896113 ns/iter 126.88322206313254 ns/iter 1.01
JSON_Object_At_Last_Key/512 521.3649871016934 ns/iter 518.9239625135524 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 65.58523605327878 ns/iter 65.6930543683446 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 164.80984530770905 ns/iter 156.99544912873236 ns/iter 1.05
JSON_Divisible_By_Decimal 239.41962550020887 ns/iter 239.59815925597422 ns/iter 1.00
JSON_String_Equal/10 6.314045564178349 ns/iter 6.333400034485164 ns/iter 1.00
JSON_String_Equal/100 6.939457043568063 ns/iter 6.93790254178163 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.623991922792434 ns/iter 0.623703819438329 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 25.202794704546378 ns/iter 25.191600773392086 ns/iter 1.00
JSON_String_Fast_Hash/10 1.2456226007592188 ns/iter 1.2461585698848514 ns/iter 1.00
JSON_String_Fast_Hash/100 1.2465057452210675 ns/iter 1.2473476261566319 ns/iter 1.00
JSON_String_Key_Hash/10 1.247078234115117 ns/iter 1.2464691893014523 ns/iter 1.00
JSON_String_Key_Hash/100 12.445360157371312 ns/iter 12.443105616038471 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.115701640882355 ns/iter 3.1135144394238523 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.1108926881488363 ns/iter 3.1157091199214553 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.4260221628342435 ns/iter 3.473473912941971 ns/iter 0.99
Regex_Lower_S_Or_Upper_S_Asterisk 0.62782287948948 ns/iter 0.6234670611089432 ns/iter 1.01
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.9387398307190409 ns/iter 0.9341987660036627 ns/iter 1.00
Regex_Period_Asterisk 0.9337595837684973 ns/iter 0.9349110380219108 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 0.6229998589182236 ns/iter 0.6228883678764819 ns/iter 1.00
Regex_Period_Plus 0.624693207204996 ns/iter 0.6233769682803094 ns/iter 1.00
Regex_Period 0.9354306603137363 ns/iter 0.9346485898521539 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 0.9341347196321723 ns/iter 0.9340995319699195 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 0.6229100410434522 ns/iter 0.6231234020802772 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 0.6227097505264519 ns/iter 0.6236752505862183 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.9342152540111032 ns/iter 0.9345775310906272 ns/iter 1.00
Regex_Caret_X_Hyphen 4.048026154109346 ns/iter 4.0520545809076 ns/iter 1.00
Regex_Period_Md_Dollar 39.79809931448112 ns/iter 30.38064536392634 ns/iter 1.31
Regex_Caret_Slash_Period_Asterisk 4.356332216098038 ns/iter 4.357500757542845 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 1.2459402730042353 ns/iter 1.245638912333215 ns/iter 1.00
Regex_Nested_Backtrack 38.730457428247284 ns/iter 36.61411157469883 ns/iter 1.06

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: e362a2e Previous: 9feca28 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.1970508192200517 ns/iter 2.1985375575675326 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.187701393556126 ns/iter 2.181269871338754 ns/iter 1.00
Regex_Period_Asterisk 2.21720766307175 ns/iter 2.180431735051359 ns/iter 1.02
Regex_Group_Period_Asterisk_Group 2.2031172861362642 ns/iter 2.1901221045462904 ns/iter 1.01
Regex_Period_Plus 2.273234464290602 ns/iter 2.4906570547593674 ns/iter 0.91
Regex_Period 2.235642848110927 ns/iter 2.490171204545779 ns/iter 0.90
Regex_Caret_Period_Plus_Dollar 2.4920093724662205 ns/iter 2.801403587459109 ns/iter 0.89
Regex_Caret_Group_Period_Plus_Group_Dollar 2.50032243991212 ns/iter 2.8080944613747123 ns/iter 0.89
Regex_Caret_Period_Asterisk_Dollar 2.187747289211176 ns/iter 3.1105742423476404 ns/iter 0.70
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.1915338195993956 ns/iter 3.1126445504041786 ns/iter 0.70
Regex_Caret_X_Hyphen 5.621646793137142 ns/iter 6.851496669280945 ns/iter 0.82
Regex_Period_Md_Dollar 32.40281381406898 ns/iter 32.34748634233199 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 5.60059971199361 ns/iter 5.9146718400961165 ns/iter 0.95
Regex_Caret_Period_Range_Dollar 2.8023379283423666 ns/iter 2.801627676953156 ns/iter 1.00
Regex_Nested_Backtrack 59.69216014310924 ns/iter 59.38204026762927 ns/iter 1.01
JSON_Array_Of_Objects_Unique 403.0982105159232 ns/iter 405.47520742663835 ns/iter 0.99
JSON_Parse_1 4888.653722691552 ns/iter 4884.830555556002 ns/iter 1.00
JSON_Parse_Real 5343.461741950364 ns/iter 5337.313353242182 ns/iter 1.00
JSON_Parse_Decimal 7691.732041765732 ns/iter 7819.066968629766 ns/iter 0.98
JSON_Parse_Schema_ISO_Language 3431505.660098324 ns/iter 3456287.6995072784 ns/iter 0.99
JSON_Parse_Integer 3735.2975340274124 ns/iter 3705.9481519373 ns/iter 1.01
JSON_Parse_String_NonSSO_Plain 4934.518770143431 ns/iter 4917.998473672867 ns/iter 1.00
JSON_Parse_String_SSO_Plain 2679.7265131460194 ns/iter 2723.4593416986554 ns/iter 0.98
JSON_Parse_String_Escape_Heavy 14170.266831352885 ns/iter 14409.795252876118 ns/iter 0.98
JSON_Parse_Object_Short_Keys 7906.396096791108 ns/iter 7917.5612005793355 ns/iter 1.00
JSON_Parse_Object_Scalar_Properties 4095.0102191062947 ns/iter 4203.28109834712 ns/iter 0.97
JSON_Parse_Object_Array_Properties 5777.110838005853 ns/iter 5481.034396996828 ns/iter 1.05
JSON_Parse_Object_Object_Properties 5526.217152636758 ns/iter 5453.403472931086 ns/iter 1.01
JSON_Parse_Nested_Containers 44494.26610267304 ns/iter 44697.994603518775 ns/iter 1.00
JSON_From_String_Copy 19.6213187341882 ns/iter 19.651529181515517 ns/iter 1.00
JSON_From_String_Temporary 17.322583853213512 ns/iter 17.14280943675066 ns/iter 1.01
JSON_Number_To_Double 23.290777801798633 ns/iter 23.99467817211526 ns/iter 0.97
JSON_Object_At_Last_Key/8 3.4838645881931116 ns/iter 3.4808836589640504 ns/iter 1.00
JSON_Object_At_Last_Key/32 11.842181452897028 ns/iter 11.829269460342644 ns/iter 1.00
JSON_Object_At_Last_Key/128 48.91754320845932 ns/iter 48.895426874632705 ns/iter 1.00
JSON_Object_At_Last_Key/512 385.5302108741697 ns/iter 384.2729407423793 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 56.817095636646805 ns/iter 65.28635223635695 ns/iter 0.87
JSON_Equality_Helm_Chart_Lock 166.9445298543857 ns/iter 168.008674651763 ns/iter 0.99
JSON_Divisible_By_Decimal 250.89812412099934 ns/iter 252.8489550870729 ns/iter 0.99
JSON_String_Equal/10 7.170243767910606 ns/iter 6.853966570052249 ns/iter 1.05
JSON_String_Equal/100 7.796907409327316 ns/iter 7.480971017997816 ns/iter 1.04
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9361956785488836 ns/iter 0.9366469925631027 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 10.583558127063899 ns/iter 14.927439122231885 ns/iter 0.71
JSON_String_Fast_Hash/10 2.180557778856313 ns/iter 2.17900304439871 ns/iter 1.00
JSON_String_Fast_Hash/100 2.180253202756091 ns/iter 2.178981062400704 ns/iter 1.00
JSON_String_Key_Hash/10 2.182394685234921 ns/iter 2.7181698239535286 ns/iter 0.80
JSON_String_Key_Hash/100 6.5400316243870815 ns/iter 9.022933515297062 ns/iter 0.72
JSON_Object_Defines_Miss_Same_Length 2.6891657908069795 ns/iter 2.7046966271818333 ns/iter 0.99
JSON_Object_Defines_Miss_Too_Small 2.610913480078231 ns/iter 2.6874137884019893 ns/iter 0.97
JSON_Object_Defines_Miss_Too_Large 2.668216070041178 ns/iter 2.7930350461130287 ns/iter 0.96
Pointer_Object_Traverse 24.281380857226456 ns/iter 24.06697365570795 ns/iter 1.01
Pointer_Object_Try_Traverse 28.464215295138864 ns/iter 28.433859964891496 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 149.5832950710298 ns/iter 219.74093426245196 ns/iter 0.68
Pointer_Walker_Schema_ISO_Language 1690123.843749857 ns/iter 1742393.9029851083 ns/iter 0.97
Pointer_Maybe_Tracked_Deeply_Nested/0 1231766.0214669793 ns/iter 1258638.9353679058 ns/iter 0.98
Pointer_Maybe_Tracked_Deeply_Nested/1 1753577.8521303833 ns/iter 1786018.096692018 ns/iter 0.98
Pointer_Position_Tracker_Get_Deeply_Nested 670.1675847466579 ns/iter 678.860190431981 ns/iter 0.99
URITemplateRouter_Create 31986.24936282631 ns/iter 32269.07159948469 ns/iter 0.99
URITemplateRouter_Match 175.34335187154966 ns/iter 178.83987089346172 ns/iter 0.98
URITemplateRouter_Match_BasePath 203.17388122502996 ns/iter 198.2289057335097 ns/iter 1.02
URITemplateRouterView_Restore 7630.354809911197 ns/iter 7769.563643829457 ns/iter 0.98
URITemplateRouterView_Match 164.62406454023792 ns/iter 164.37634924448935 ns/iter 1.00
URITemplateRouterView_Match_BasePath 188.7504501630248 ns/iter 188.25847211028432 ns/iter 1.00
URITemplateRouterView_Arguments 439.79750694108003 ns/iter 441.55388982100857 ns/iter 1.00
JSONL_Parse_Large 9798689.472222893 ns/iter 9945557.971427986 ns/iter 0.99
JSONL_Parse_Large_GZIP 11391458.19672276 ns/iter 11476385.295082526 ns/iter 0.99
HTML_Build_Table_100000 67808059.90000544 ns/iter 69554166.599994 ns/iter 0.97
HTML_Render_Table_100000 5143214.170369801 ns/iter 5480168.881889746 ns/iter 0.94
GZIP_Compress_ISO_Language_Set_3_Locations 33143894.04762269 ns/iter 33332551.238096304 ns/iter 0.99
GZIP_Decompress_ISO_Language_Set_3_Locations 4058283.514451311 ns/iter 4194872.861445269 ns/iter 0.97
GZIP_Compress_ISO_Language_Set_3_Schema 1888372.940540673 ns/iter 1893759.1270271793 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Schema 353511.295271649 ns/iter 353195.8106746903 ns/iter 1.00
JOSE_VerifySignature_RS256 58149.59116159735 ns/iter 57886.533751965006 ns/iter 1.00
JOSE_VerifySignature_ES512 2431940.8229168793 ns/iter 2416508.2906575385 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 (windows/msvc)

Details
Benchmark suite Current: e362a2e Previous: 9feca28 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 5.038518999999724 ns/iter 5.094771999997647 ns/iter 0.99
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 5.037558999999874 ns/iter 5.013048000000708 ns/iter 1.00
Regex_Period_Asterisk 5.024704464284063 ns/iter 5.028674999998657 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 5.039354999998977 ns/iter 5.0146169642825305 ns/iter 1.00
Regex_Period_Plus 4.804246451965928 ns/iter 4.811173014464933 ns/iter 1.00
Regex_Period 4.803382376793103 ns/iter 4.808470323231301 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 4.807764519660231 ns/iter 4.805157600011208 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 4.8170796216108736 ns/iter 4.80442835893672 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 5.050776000000496 ns/iter 5.025995999999395 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 5.218084000000545 ns/iter 5.009968999997909 ns/iter 1.04
Regex_Caret_X_Hyphen 8.543288801145792 ns/iter 8.154725446430128 ns/iter 1.05
Regex_Period_Md_Dollar 45.192817973054574 ns/iter 44.45457500000316 ns/iter 1.02
Regex_Caret_Slash_Period_Asterisk 8.100648178122604 ns/iter 7.834899553569943 ns/iter 1.03
Regex_Caret_Period_Range_Dollar 6.19904732142881 ns/iter 5.952895535711734 ns/iter 1.04
Regex_Nested_Backtrack 53.5734910714325 ns/iter 54.48742999997194 ns/iter 0.98
JSON_Array_Of_Objects_Unique 499.98390000018844 ns/iter 500.36653355582155 ns/iter 1.00
JSON_Parse_1 8795.947544642602 ns/iter 9232.778871522076 ns/iter 0.95
JSON_Parse_Real 15990.955357142615 ns/iter 17966.884376459773 ns/iter 0.89
JSON_Parse_Decimal 12344.308928569651 ns/iter 11764.800000001685 ns/iter 1.05
JSON_Parse_Schema_ISO_Language 7475832.142856932 ns/iter 7113813.333333181 ns/iter 1.05
JSON_Parse_Integer 6124.572321429663 ns/iter 6105.265178571732 ns/iter 1.00
JSON_Parse_String_NonSSO_Plain 7717.2979910703325 ns/iter 7715.393973215207 ns/iter 1.00
JSON_Parse_String_SSO_Plain 3723.72209821416 ns/iter 3594.5657475235494 ns/iter 1.04
JSON_Parse_String_Escape_Heavy 21901.706249998657 ns/iter 21749.724999992282 ns/iter 1.01
JSON_Parse_Object_Short_Keys 13166.405357143925 ns/iter 13132.717857144728 ns/iter 1.00
JSON_Parse_Object_Scalar_Properties 6977.116071428416 ns/iter 6811.742857142431 ns/iter 1.02
JSON_Parse_Object_Array_Properties 11317.894642859625 ns/iter 11611.001562499723 ns/iter 0.97
JSON_Parse_Object_Object_Properties 11547.369642857217 ns/iter 11796.117857142819 ns/iter 0.98
JSON_Parse_Nested_Containers 79863.04687501087 ns/iter 79351.01111556681 ns/iter 1.01
JSON_From_String_Copy 64.70644999999422 ns/iter 63.932348214288076 ns/iter 1.01
JSON_From_String_Temporary 59.799758928562596 ns/iter 59.7632589285776 ns/iter 1.00
JSON_Number_To_Double 119.2870312500105 ns/iter 118.7448928571452 ns/iter 1.00
JSON_Object_At_Last_Key/8 7.287413392855261 ns/iter 7.221516071427102 ns/iter 1.01
JSON_Object_At_Last_Key/32 23.4969464285736 ns/iter 23.204696874998376 ns/iter 1.01
JSON_Object_At_Last_Key/128 89.44357636413046 ns/iter 89.20859869601048 ns/iter 1.00
JSON_Object_At_Last_Key/512 422.9130593837542 ns/iter 425.20812500015376 ns/iter 0.99
JSON_Fast_Hash_Helm_Chart_Lock 67.0768660714113 ns/iter 65.57590178569431 ns/iter 1.02
JSON_Equality_Helm_Chart_Lock 299.4817835399842 ns/iter 299.21574115900216 ns/iter 1.00
JSON_Divisible_By_Decimal 300.46910485837793 ns/iter 301.18406459997146 ns/iter 1.00
JSON_String_Equal/10 15.072292410717328 ns/iter 15.533265624999412 ns/iter 0.97
JSON_String_Equal/100 16.358529577957057 ns/iter 16.319302792500647 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 2.52068642857109 ns/iter 2.5208907142850223 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.196648150906231 ns/iter 15.012609374999947 ns/iter 0.95
JSON_String_Fast_Hash/10 4.704877912286507 ns/iter 4.70376764442771 ns/iter 1.00
JSON_String_Fast_Hash/100 4.725973001620406 ns/iter 4.714224666229753 ns/iter 1.00
JSON_String_Key_Hash/10 5.346233928571158 ns/iter 5.358186607143774 ns/iter 1.00
JSON_String_Key_Hash/100 11.880896428570916 ns/iter 11.876355357141424 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 4.082335453719181 ns/iter 4.181401257467192 ns/iter 0.98
JSON_Object_Defines_Miss_Too_Small 5.038086094874254 ns/iter 5.0219849999984945 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 4.399863749999611 ns/iter 4.392188516002269 ns/iter 1.00
Pointer_Object_Traverse 69.78132142858077 ns/iter 70.17865178572232 ns/iter 0.99
Pointer_Object_Try_Traverse 72.00300892857773 ns/iter 70.94252232141076 ns/iter 1.01
Pointer_Push_Back_Pointer_To_Weak_Pointer 182.19995376783862 ns/iter 161.82162467557757 ns/iter 1.13
Pointer_Walker_Schema_ISO_Language 7516338.666667555 ns/iter 6885109.821427347 ns/iter 1.09
Pointer_Maybe_Tracked_Deeply_Nested/0 2544290.6354513993 ns/iter 2292959.642857438 ns/iter 1.11
Pointer_Maybe_Tracked_Deeply_Nested/1 3818920.111731721 ns/iter 3649727.179487318 ns/iter 1.05
Pointer_Position_Tracker_Get_Deeply_Nested 577.456568831548 ns/iter 568.0649553571218 ns/iter 1.02
URITemplateRouter_Create 41690.82540466909 ns/iter 40049.55357141325 ns/iter 1.04
URITemplateRouter_Match 258.41725910521 ns/iter 232.90018606014507 ns/iter 1.11
URITemplateRouter_Match_BasePath 295.02719620654744 ns/iter 264.2197796527654 ns/iter 1.12
URITemplateRouterView_Restore 37114.89372624713 ns/iter 31895.55357142889 ns/iter 1.16
URITemplateRouterView_Match 193.43616012821138 ns/iter 179.542944601967 ns/iter 1.08
URITemplateRouterView_Match_BasePath 205.0480624999551 ns/iter 204.42920575263514 ns/iter 1.00
URITemplateRouterView_Arguments 546.2569999999687 ns/iter 531.7759821427411 ns/iter 1.03
JSONL_Parse_Large 33237919.999999125 ns/iter 32557685.714285374 ns/iter 1.02
JSONL_Parse_Large_GZIP 33878519.99999611 ns/iter 33179719.04761223 ns/iter 1.02
HTML_Build_Table_100000 90247199.99998914 ns/iter 89123255.55552848 ns/iter 1.01
HTML_Render_Table_100000 8258759.999999812 ns/iter 6997792.22222282 ns/iter 1.18
GZIP_Compress_ISO_Language_Set_3_Locations 36549931.57895086 ns/iter 36239484.21052678 ns/iter 1.01
GZIP_Decompress_ISO_Language_Set_3_Locations 9955306.666667337 ns/iter 9128782.666666666 ns/iter 1.09
GZIP_Compress_ISO_Language_Set_3_Schema 2116580.160857888 ns/iter 2111106.5624992875 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Schema 624424.732142716 ns/iter 615561.0714285688 ns/iter 1.01
JOSE_VerifySignature_RS256 21355.574255696964 ns/iter 21174.8624999899 ns/iter 1.01
JOSE_VerifySignature_ES512 1532300.602409477 ns/iter 1532741.365462057 ns/iter 1.00

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

@jviotti jviotti force-pushed the jsonld-expand branch 6 times, most recently from a365062 to 927947e Compare June 25, 2026 23:06
jviotti added 2 commits June 25, 2026 19:21
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
jviotti added 5 commits June 26, 2026 14:32
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti changed the title [WIP] Implement JSON-LD expansion Implement JSON-LD expansion Jun 26, 2026
@jviotti jviotti marked this pull request as ready for review June 26, 2026 21:58
@augmentcode

augmentcode Bot commented Jun 26, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR introduces a new sourcemeta::core::jsonld component implementing the JSON-LD Expansion algorithm (JSON-LD 1.1) with an explicit JSON-LD 1.0 processing mode.

Changes:

  • Adds the SOURCEMETA_CORE_JSONLD build option and wires it into the top-level build and website CI workflows.
  • Adds CMake/package-component plumbing for jsonld in config.cmake.in and the packaging find_package test.
  • Introduces a public API (jsonld_expand overloads) plus JSONLDResolver, JSONLDVersion, and a JSONLDError type that carries an API error code and JSON Pointer.
  • Implements core expansion pieces: IRI expansion, context processing, term-definition creation, value expansion, and the main expansion walk (with keyword utilities + precomputed hashes).
  • Adds unit tests for core behaviors and error codes/pointers, and a runner for the W3C JSON-LD expansion test suite.

Technical Notes: The resolver is used for remote context loading during expansion, and the test-suite runner maps suite IRIs to on-disk JSON fixtures (stripping fragment/query before resolving).

🤖 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. 2 suggestions posted.

Fix All in Augment

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

Comment thread src/core/jsonld/jsonld_value_expansion.cc Outdated
Comment thread src/core/jsonld/jsonld_expansion.cc

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

7 issues found across 21 files

Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.

Re-trigger cubic

Comment thread config.cmake.in
Comment thread src/core/jsonld/jsonld_value_expansion.cc Outdated
Comment thread src/core/jsonld/jsonld_create_term_definition.cc Outdated
Comment thread src/core/jsonld/jsonld_context_processing.cc
Comment thread src/core/jsonld/jsonld_create_term_definition.cc
Comment thread src/core/jsonld/jsonld_expansion.cc
Comment thread src/core/jsonld/jsonld.cc
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti

jviotti commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

augment review

@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. 3 suggestions posted.

Fix All in Augment

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

Comment thread src/core/jsonld/jsonld_create_term_definition.cc
Comment thread src/core/jsonld/jsonld_context_processing.cc
Comment thread src/core/jsonld/jsonld_expansion.cc Outdated
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti

jviotti commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

augment review

@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. 3 suggestions posted.

Fix All in Augment

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

Comment thread src/core/jsonld/jsonld_expansion.cc
Comment thread src/core/jsonld/jsonld_expansion.cc
Comment thread src/core/jsonld/jsonld_context_processing.cc
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti

jviotti commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

augment review

@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. 4 suggestions posted.

Fix All in Augment

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

Comment thread src/core/jsonld/jsonld_create_term_definition.cc
Comment thread src/core/jsonld/jsonld_expansion.cc
Comment thread src/core/jsonld/jsonld_context_processing.cc
Comment thread src/core/jsonld/jsonld_iri_expansion.cc
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti

jviotti commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

augment review

@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. 2 suggestions posted.

Fix All in Augment

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

Comment thread src/core/jsonld/jsonld_context_processing.cc
Comment thread test/jsonld/jsonld_suite.cc
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti

jviotti commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

augment review

@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. 4 suggestions posted.

Fix All in Augment

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

Comment thread src/core/jsonld/include/sourcemeta/core/jsonld_error.h
Comment thread src/core/jsonld/jsonld_context_processing.cc
Comment thread src/core/jsonld/jsonld_create_term_definition.cc
Comment thread src/core/jsonld/jsonld_expansion.cc
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti

jviotti commented Jun 27, 2026

Copy link
Copy Markdown
Member Author

augment review

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. No suggestions at this time.

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

@jviotti jviotti merged commit 3f61ec7 into main Jun 27, 2026
12 checks passed
@jviotti jviotti deleted the jsonld-expand branch June 27, 2026 13:45
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