-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement a
.contains()
method for JSON strings (#1431)
Signed-off-by: Juan Cruz Viotti <[email protected]>
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74edf62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark (macos/llvm)
JSON_Array_Of_Objects_Unique
345.5599624082129
ns/iter342.6489024557436
ns/iter1.01
JSON_Parse_1
22788.1029444971
ns/iter21705.226241549248
ns/iter1.05
JSON_Fast_Hash_Helm_Chart_Lock
51.12226054549295
ns/iter51.44898973050822
ns/iter0.99
JSON_Equality_Helm_Chart_Lock
138.80016077063746
ns/iter131.93544163518078
ns/iter1.05
Regex_Lower_S_Or_Upper_S_Asterisk
1.6754539607967196
ns/iter1.5694098007288662
ns/iter1.07
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar
1.673942250140308
ns/iter1.5747650687678212
ns/iter1.06
Regex_Period_Asterisk
1.7322030921514044
ns/iter1.5713696147351714
ns/iter1.10
Regex_Group_Period_Asterisk_Group
1.6677447414471205
ns/iter1.5720335801048975
ns/iter1.06
Regex_Period_Plus
2.050592831600103
ns/iter1.8900372415409974
ns/iter1.08
Regex_Period
1.9763232803750308
ns/iter1.8855641136840815
ns/iter1.05
Regex_Caret_Period_Plus_Dollar
1.927817331876842
ns/iter1.8848963733772441
ns/iter1.02
Regex_Caret_Group_Period_Plus_Group_Dollar
1.9822846670478862
ns/iter1.8852162281215603
ns/iter1.05
Regex_Caret_Period_Asterisk_Dollar
1.654169037772479
ns/iter1.5692751711659874
ns/iter1.05
Regex_Caret_Group_Period_Asterisk_Group_Dollar
1.5894695983464244
ns/iter1.570022786134582
ns/iter1.01
Regex_Caret_X_Hyphen
6.474143645404102
ns/iter6.30523988713433
ns/iter1.03
Regex_Period_Md_Dollar
71.18644733828347
ns/iter69.48670971486591
ns/iter1.02
Regex_Caret_Slash_Period_Asterisk
6.127809216815011
ns/iter6.710547224593167
ns/iter0.91
Regex_Caret_Period_Range_Dollar
2.1766841476606786
ns/iter2.0361345717246513
ns/iter1.07
Regex_Nested_Backtrack
784.5408326803114
ns/iter725.8954708932023
ns/iter1.08
Pointer_Object_Traverse
16.896504366353373
ns/iter15.247473910253499
ns/iter1.11
Pointer_Object_Try_Traverse
33.49819506497382
ns/iter31.508737475598654
ns/iter1.06
Pointer_Push_Back_Pointer_To_Weak_Pointer
179.74346485280174
ns/iter173.22369903074818
ns/iter1.04
This comment was automatically generated by workflow using github-action-benchmark.
74edf62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark (linux/llvm)
JSON_Array_Of_Objects_Unique
531.3838675146837
ns/iter445.1658283192557
ns/iter1.19
JSON_Parse_1
29865.421645610975
ns/iter29969.246862281914
ns/iter1.00
JSON_Fast_Hash_Helm_Chart_Lock
124.81094345733217
ns/iter54.69452167440643
ns/iter2.28
JSON_Equality_Helm_Chart_Lock
143.99038950535223
ns/iter145.74450222918298
ns/iter0.99
Regex_Lower_S_Or_Upper_S_Asterisk
2.226054295923506
ns/iter2.20022864160664
ns/iter1.01
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar
2.190446327839448
ns/iter2.193531428313369
ns/iter1.00
Regex_Period_Asterisk
2.195006432717628
ns/iter2.2128287716203614
ns/iter0.99
Regex_Group_Period_Asterisk_Group
2.195752303351229
ns/iter2.191307434774555
ns/iter1.00
Regex_Period_Plus
2.8033055954103623
ns/iter2.486323042170805
ns/iter1.13
Regex_Period
2.7960589635824014
ns/iter2.4859844836476954
ns/iter1.12
Regex_Caret_Period_Plus_Dollar
2.7965655380307433
ns/iter2.2710142581093438
ns/iter1.23
Regex_Caret_Group_Period_Plus_Group_Dollar
2.797075639250317
ns/iter2.2765616233953105
ns/iter1.23
Regex_Caret_Period_Asterisk_Dollar
3.417313585951194
ns/iter2.48695450832223
ns/iter1.37
Regex_Caret_Group_Period_Asterisk_Group_Dollar
3.419861663267074
ns/iter2.4861893176483925
ns/iter1.38
Regex_Caret_X_Hyphen
12.647025336496508
ns/iter12.52856247108536
ns/iter1.01
Regex_Period_Md_Dollar
73.81224503554736
ns/iter73.70581651740909
ns/iter1.00
Regex_Caret_Slash_Period_Asterisk
6.526870521860383
ns/iter7.149466252312237
ns/iter0.91
Regex_Caret_Period_Range_Dollar
4.042429979949761
ns/iter2.4938970230158755
ns/iter1.62
Regex_Nested_Backtrack
521.3237557120449
ns/iter491.679554149494
ns/iter1.06
Pointer_Object_Traverse
44.23427922929643
ns/iter44.788569441834994
ns/iter0.99
Pointer_Object_Try_Traverse
52.76546648734447
ns/iter53.193323097873595
ns/iter0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer
352.3415806592013
ns/iter354.7159460770064
ns/iter0.99
This comment was automatically generated by workflow using github-action-benchmark.
74edf62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark (windows/msvc)
JSON_Array_Of_Objects_Unique
416.2350181617304
ns/iter435.00737500011155
ns/iter0.96
JSON_Parse_1
79456.54017856694
ns/iter83702.96874998319
ns/iter0.95
JSON_Fast_Hash_Helm_Chart_Lock
53.64400000000842
ns/iter59.704940000006
ns/iter0.90
JSON_Equality_Helm_Chart_Lock
225.75624999998212
ns/iter228.0587357077244
ns/iter0.99
Regex_Lower_S_Or_Upper_S_Asterisk
8.313941480741248
ns/iter8.532138392856682
ns/iter0.97
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar
8.234852641808677
ns/iter8.04193255338269
ns/iter1.02
Regex_Period_Asterisk
8.400391033926665
ns/iter8.327903534250876
ns/iter1.01
Regex_Group_Period_Asterisk_Group
7.774197544641988
ns/iter8.034918526784095
ns/iter0.97
Regex_Period_Plus
7.8338785364560275
ns/iter8.135332999397985
ns/iter0.96
Regex_Period
8.095129464285986
ns/iter8.051205767629174
ns/iter1.01
Regex_Caret_Period_Plus_Dollar
7.781695312499995
ns/iter7.912025857533314
ns/iter0.98
Regex_Caret_Group_Period_Plus_Group_Dollar
8.128320499426898
ns/iter8.832472728425117
ns/iter0.92
Regex_Caret_Period_Asterisk_Dollar
8.025495499886402
ns/iter7.789064062500017
ns/iter1.03
Regex_Caret_Group_Period_Asterisk_Group_Dollar
7.776171874999603
ns/iter8.23741737394046
ns/iter0.94
Regex_Caret_X_Hyphen
12.138887500000807
ns/iter11.566604687502036
ns/iter1.05
Regex_Period_Md_Dollar
142.47543783593028
ns/iter142.00964767811402
ns/iter1.00
Regex_Caret_Slash_Period_Asterisk
11.67928035714283
ns/iter11.935163116364066
ns/iter0.98
Regex_Caret_Period_Range_Dollar
8.700463354015962
ns/iter8.964932102834474
ns/iter0.97
Regex_Nested_Backtrack
589.8316071428513
ns/iter586.6695535713365
ns/iter1.01
Pointer_Object_Traverse
56.45785000000387
ns/iter55.89243749998981
ns/iter1.01
Pointer_Object_Try_Traverse
75.74072544643025
ns/iter75.99424107141317
ns/iter1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer
176.9836765163786
ns/iter191.31794565335926
ns/iter0.93
This comment was automatically generated by workflow using github-action-benchmark.
74edf62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark (linux/gcc)
Pointer_Object_Traverse
44.09603547947162
ns/iter50.18702809651256
ns/iter0.88
Pointer_Object_Try_Traverse
22.423625843284626
ns/iter24.622513914266523
ns/iter0.91
Pointer_Push_Back_Pointer_To_Weak_Pointer
214.08581901279234
ns/iter213.17270709021975
ns/iter1.00
Regex_Lower_S_Or_Upper_S_Asterisk
3.1366170253528765
ns/iter3.1231955616085556
ns/iter1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar
3.123526619636233
ns/iter3.130828609019674
ns/iter1.00
Regex_Period_Asterisk
3.1271336081497276
ns/iter3.122312645712708
ns/iter1.00
Regex_Group_Period_Asterisk_Group
3.1344342068596927
ns/iter3.122895313002317
ns/iter1.00
Regex_Period_Plus
3.1226219887236892
ns/iter3.1273323382859193
ns/iter1.00
Regex_Period
3.128748324632939
ns/iter3.126788947460779
ns/iter1.00
Regex_Caret_Period_Plus_Dollar
3.1346871531291507
ns/iter3.1316186871732135
ns/iter1.00
Regex_Caret_Group_Period_Plus_Group_Dollar
3.128460984644729
ns/iter3.1233518534670113
ns/iter1.00
Regex_Caret_Period_Asterisk_Dollar
3.7294113678928533
ns/iter3.1290650749377256
ns/iter1.19
Regex_Caret_Group_Period_Asterisk_Group_Dollar
3.7330462672094815
ns/iter3.126457674540122
ns/iter1.19
Regex_Caret_X_Hyphen
12.43268021628107
ns/iter12.431149374894764
ns/iter1.00
Regex_Period_Md_Dollar
89.1613944110879
ns/iter89.25451018058364
ns/iter1.00
Regex_Caret_Slash_Period_Asterisk
7.147613919207099
ns/iter7.14604530308933
ns/iter1.00
Regex_Caret_Period_Range_Dollar
4.040605990707221
ns/iter4.039906061789911
ns/iter1.00
Regex_Nested_Backtrack
820.5089142983219
ns/iter833.3509879230805
ns/iter0.98
JSON_Array_Of_Objects_Unique
380.7941465886984
ns/iter377.4044799985154
ns/iter1.01
JSON_Parse_1
33198.954852518385
ns/iter33185.93026466167
ns/iter1.00
JSON_Fast_Hash_Helm_Chart_Lock
62.63993099608115
ns/iter62.94871641328834
ns/iter1.00
JSON_Equality_Helm_Chart_Lock
142.9680577815802
ns/iter146.9782408346559
ns/iter0.97
This comment was automatically generated by workflow using github-action-benchmark.
74edf62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark (linux/llvm)
JSON_Array_Of_Objects_Unique
411.79655914683343
ns/iter445.1658283192557
ns/iter0.93
JSON_Parse_1
29773.384881782105
ns/iter29969.246862281914
ns/iter0.99
JSON_Fast_Hash_Helm_Chart_Lock
58.793479116985246
ns/iter54.69452167440643
ns/iter1.07
JSON_Equality_Helm_Chart_Lock
141.04137149545704
ns/iter145.74450222918298
ns/iter0.97
Regex_Lower_S_Or_Upper_S_Asterisk
2.185260185690387
ns/iter2.20022864160664
ns/iter0.99
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar
2.183809137503474
ns/iter2.193531428313369
ns/iter1.00
Regex_Period_Asterisk
2.1849037028794163
ns/iter2.2128287716203614
ns/iter0.99
Regex_Group_Period_Asterisk_Group
2.182998025905136
ns/iter2.191307434774555
ns/iter1.00
Regex_Period_Plus
2.4904911256288735
ns/iter2.486323042170805
ns/iter1.00
Regex_Period
2.5015406408885403
ns/iter2.4859844836476954
ns/iter1.01
Regex_Caret_Period_Plus_Dollar
2.490430975466031
ns/iter2.2710142581093438
ns/iter1.10
Regex_Caret_Group_Period_Plus_Group_Dollar
2.491379014885423
ns/iter2.2765616233953105
ns/iter1.09
Regex_Caret_Period_Asterisk_Dollar
2.4919708549170605
ns/iter2.48695450832223
ns/iter1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar
2.182136960046927
ns/iter2.4861893176483925
ns/iter0.88
Regex_Caret_X_Hyphen
12.632807772915976
ns/iter12.52856247108536
ns/iter1.01
Regex_Period_Md_Dollar
73.55266047175674
ns/iter73.70581651740909
ns/iter1.00
Regex_Caret_Slash_Period_Asterisk
5.282843369847085
ns/iter7.149466252312237
ns/iter0.74
Regex_Caret_Period_Range_Dollar
2.801547513136593
ns/iter2.4938970230158755
ns/iter1.12
Regex_Nested_Backtrack
503.72623662005947
ns/iter491.679554149494
ns/iter1.02
Pointer_Object_Traverse
44.655462835750214
ns/iter44.788569441834994
ns/iter1.00
Pointer_Object_Try_Traverse
52.56762146059341
ns/iter53.193323097873595
ns/iter0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer
352.06734228302963
ns/iter354.7159460770064
ns/iter0.99
This comment was automatically generated by workflow using github-action-benchmark.
74edf62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark (macos/llvm)
JSON_Array_Of_Objects_Unique
377.36759105936306
ns/iter342.6489024557436
ns/iter1.10
JSON_Parse_1
23355.16459815158
ns/iter21705.226241549248
ns/iter1.08
JSON_Fast_Hash_Helm_Chart_Lock
51.40338031724124
ns/iter51.44898973050822
ns/iter1.00
JSON_Equality_Helm_Chart_Lock
144.99777456858735
ns/iter131.93544163518078
ns/iter1.10
Regex_Lower_S_Or_Upper_S_Asterisk
1.7085681224589777
ns/iter1.5694098007288662
ns/iter1.09
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar
1.7089753310598566
ns/iter1.5747650687678212
ns/iter1.09
Regex_Period_Asterisk
2.127068787775394
ns/iter1.5713696147351714
ns/iter1.35
Regex_Group_Period_Asterisk_Group
1.779124576327936
ns/iter1.5720335801048975
ns/iter1.13
Regex_Period_Plus
2.2541513785785376
ns/iter1.8900372415409974
ns/iter1.19
Regex_Period
2.14886565846379
ns/iter1.8855641136840815
ns/iter1.14
Regex_Caret_Period_Plus_Dollar
2.02169548662943
ns/iter1.8848963733772441
ns/iter1.07
Regex_Caret_Group_Period_Plus_Group_Dollar
2.0563152945791376
ns/iter1.8852162281215603
ns/iter1.09
Regex_Caret_Period_Asterisk_Dollar
1.7320459923050406
ns/iter1.5692751711659874
ns/iter1.10
Regex_Caret_Group_Period_Asterisk_Group_Dollar
1.7618077516372965
ns/iter1.570022786134582
ns/iter1.12
Regex_Caret_X_Hyphen
7.005609672977873
ns/iter6.30523988713433
ns/iter1.11
Regex_Period_Md_Dollar
73.20043099253255
ns/iter69.48670971486591
ns/iter1.05
Regex_Caret_Slash_Period_Asterisk
5.7324555372269534
ns/iter6.710547224593167
ns/iter0.85
Regex_Caret_Period_Range_Dollar
2.240132881939963
ns/iter2.0361345717246513
ns/iter1.10
Regex_Nested_Backtrack
776.731504365721
ns/iter725.8954708932023
ns/iter1.07
Pointer_Object_Traverse
16.565994456988918
ns/iter15.247473910253499
ns/iter1.09
Pointer_Object_Try_Traverse
35.05817213188984
ns/iter31.508737475598654
ns/iter1.11
Pointer_Push_Back_Pointer_To_Weak_Pointer
215.45805620954178
ns/iter173.22369903074818
ns/iter1.24
This comment was automatically generated by workflow using github-action-benchmark.
74edf62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark (windows/msvc)
JSON_Array_Of_Objects_Unique
417.2314870673658
ns/iter435.00737500011155
ns/iter0.96
JSON_Parse_1
97255.76536761683
ns/iter83702.96874998319
ns/iter1.16
JSON_Fast_Hash_Helm_Chart_Lock
58.947960000000414
ns/iter59.704940000006
ns/iter0.99
JSON_Equality_Helm_Chart_Lock
216.43504614130092
ns/iter228.0587357077244
ns/iter0.95
Regex_Lower_S_Or_Upper_S_Asterisk
8.092671392442448
ns/iter8.532138392856682
ns/iter0.95
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar
8.034435937499751
ns/iter8.04193255338269
ns/iter1.00
Regex_Period_Asterisk
7.903838804000683
ns/iter8.327903534250876
ns/iter0.95
Regex_Group_Period_Asterisk_Group
8.067917374697256
ns/iter8.034918526784095
ns/iter1.00
Regex_Period_Plus
8.375778980464977
ns/iter8.135332999397985
ns/iter1.03
Regex_Period
8.037340142690908
ns/iter8.051205767629174
ns/iter1.00
Regex_Caret_Period_Plus_Dollar
7.892258000479893
ns/iter7.912025857533314
ns/iter1.00
Regex_Caret_Group_Period_Plus_Group_Dollar
8.063392857143066
ns/iter8.832472728425117
ns/iter0.91
Regex_Caret_Period_Asterisk_Dollar
8.068423624694631
ns/iter7.789064062500017
ns/iter1.04
Regex_Caret_Group_Period_Asterisk_Group_Dollar
7.778499072417284
ns/iter8.23741737394046
ns/iter0.94
Regex_Caret_X_Hyphen
11.636026785713023
ns/iter11.566604687502036
ns/iter1.01
Regex_Period_Md_Dollar
141.7390651009447
ns/iter142.00964767811402
ns/iter1.00
Regex_Caret_Slash_Period_Asterisk
11.781008928571573
ns/iter11.935163116364066
ns/iter0.99
Regex_Caret_Period_Range_Dollar
8.717446874999979
ns/iter8.964932102834474
ns/iter0.97
Regex_Nested_Backtrack
587.2363392856731
ns/iter586.6695535713365
ns/iter1.00
Pointer_Object_Traverse
55.951062499996084
ns/iter55.89243749998981
ns/iter1.00
Pointer_Object_Try_Traverse
75.96493750000377
ns/iter75.99424107141317
ns/iter1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer
187.01165955462739
ns/iter191.31794565335926
ns/iter0.98
This comment was automatically generated by workflow using github-action-benchmark.
74edf62
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark (linux/gcc)
Pointer_Object_Traverse
44.607226956664306
ns/iter50.18702809651256
ns/iter0.89
Pointer_Object_Try_Traverse
22.407520959005684
ns/iter24.622513914266523
ns/iter0.91
Pointer_Push_Back_Pointer_To_Weak_Pointer
213.38891314915742
ns/iter213.17270709021975
ns/iter1.00
Regex_Lower_S_Or_Upper_S_Asterisk
3.15171849102477
ns/iter3.1231955616085556
ns/iter1.01
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar
3.184290436701411
ns/iter3.130828609019674
ns/iter1.02
Regex_Period_Asterisk
3.173268089776138
ns/iter3.122312645712708
ns/iter1.02
Regex_Group_Period_Asterisk_Group
3.180854284983809
ns/iter3.122895313002317
ns/iter1.02
Regex_Period_Plus
3.2256668918239777
ns/iter3.1273323382859193
ns/iter1.03
Regex_Period
3.182333821778798
ns/iter3.126788947460779
ns/iter1.02
Regex_Caret_Period_Plus_Dollar
3.2102564579964334
ns/iter3.1316186871732135
ns/iter1.03
Regex_Caret_Group_Period_Plus_Group_Dollar
3.2488232290733463
ns/iter3.1233518534670113
ns/iter1.04
Regex_Caret_Period_Asterisk_Dollar
3.729023152639788
ns/iter3.1290650749377256
ns/iter1.19
Regex_Caret_Group_Period_Asterisk_Group_Dollar
3.73062854068865
ns/iter3.126457674540122
ns/iter1.19
Regex_Caret_X_Hyphen
12.430397409403934
ns/iter12.431149374894764
ns/iter1.00
Regex_Period_Md_Dollar
89.91983971334406
ns/iter89.25451018058364
ns/iter1.01
Regex_Caret_Slash_Period_Asterisk
7.14693758627552
ns/iter7.14604530308933
ns/iter1.00
Regex_Caret_Period_Range_Dollar
4.040087495446088
ns/iter4.039906061789911
ns/iter1.00
Regex_Nested_Backtrack
831.1598958436795
ns/iter833.3509879230805
ns/iter1.00
JSON_Array_Of_Objects_Unique
379.9148649203714
ns/iter377.4044799985154
ns/iter1.01
JSON_Parse_1
32737.0110809825
ns/iter33185.93026466167
ns/iter0.99
JSON_Fast_Hash_Helm_Chart_Lock
63.080756695917785
ns/iter62.94871641328834
ns/iter1.00
JSON_Equality_Helm_Chart_Lock
143.90437202286466
ns/iter146.9782408346559
ns/iter0.98
This comment was automatically generated by workflow using github-action-benchmark.