Skip to content

Commit

Permalink
Support old Clang versions (#1496)
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
  • Loading branch information
jviotti authored Jan 28, 2025
1 parent 514001a commit 32f08ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/json/include/sourcemeta/core/json_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ template <typename Key, typename Value, typename Hash> class JSONObject {
inline auto size() const -> std::size_t { return this->data.size(); }

/// Access an object entry by its underlying positional index
inline auto at(const size_type index) const noexcept
-> const Container::Entry & {
inline auto at(const size_type index) const noexcept -> const
typename Container::Entry & {
return this->data.at(index);
}

Expand Down

5 comments on commit 32f08ad

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark (macos/llvm)

Benchmark suite Current: 32f08ad Previous: 514001a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.6827194789176951 ns/iter 2.039168550879791 ns/iter 0.83
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.7303372628161136 ns/iter 2.1743155860024928 ns/iter 0.80
Regex_Period_Asterisk 1.6979457280891974 ns/iter 2.3866593481865297 ns/iter 0.71
Regex_Group_Period_Asterisk_Group 1.719293095624922 ns/iter 2.2003207489224583 ns/iter 0.78
Regex_Period_Plus 2.6205341010478436 ns/iter 2.561857576637343 ns/iter 1.02
Regex_Period 2.0408653404165085 ns/iter 2.6117893271182577 ns/iter 0.78
Regex_Caret_Period_Plus_Dollar 2.0543954113417757 ns/iter 2.400864292401077 ns/iter 0.86
Regex_Caret_Group_Period_Plus_Group_Dollar 2.097602018542431 ns/iter 2.6556070161135974 ns/iter 0.79
Regex_Caret_Period_Asterisk_Dollar 1.7439165049669223 ns/iter 2.2964480278595003 ns/iter 0.76
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.717822964164223 ns/iter 2.4589279896007517 ns/iter 0.70
Regex_Caret_X_Hyphen 7.147051527943531 ns/iter 8.392715719557458 ns/iter 0.85
Regex_Period_Md_Dollar 73.07643442975136 ns/iter 86.88462279475065 ns/iter 0.84
Regex_Caret_Slash_Period_Asterisk 5.3954649742540095 ns/iter 6.2307088308850345 ns/iter 0.87
Regex_Caret_Period_Range_Dollar 2.4011941881299848 ns/iter 2.7404288084699293 ns/iter 0.88
Regex_Nested_Backtrack 784.5882081943905 ns/iter 877.1012886481179 ns/iter 0.89
JSON_Array_Of_Objects_Unique 379.6569806467342 ns/iter 408.33642546982975 ns/iter 0.93
JSON_Parse_1 35183.86221112478 ns/iter 31875.981996725088 ns/iter 1.10
JSON_Fast_Hash_Helm_Chart_Lock 62.02613171375173 ns/iter 75.7656807559545 ns/iter 0.82
JSON_Equality_Helm_Chart_Lock 134.87852202551315 ns/iter 144.90512033333874 ns/iter 0.93
JSON_String_Equal/10 12.404813837431663 ns/iter 8.902251415093126 ns/iter 1.39
JSON_String_Equal/100 10.625019157009811 ns/iter 7.6525372048429405 ns/iter 1.39
JSON_String_Equal_Small_By_Perfect_Hash/10 0.43332202807624554 ns/iter 0.3509789707190708 ns/iter 1.23
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.473855823508688 ns/iter 3.3449214512347667 ns/iter 1.04
JSON_String_Fast_Hash/10 1.928244372652104 ns/iter 1.7499961507276407 ns/iter 1.10
JSON_String_Fast_Hash/100 2.3916853368727824 ns/iter 2.106028344609897 ns/iter 1.14
JSON_String_Key_Hash/10 1.6065193911743492 ns/iter 1.4007969342317637 ns/iter 1.15
JSON_String_Key_Hash/100 1.6382410334190993 ns/iter 1.390808707188053 ns/iter 1.18
JSON_Object_Defines_Miss_Same_Length 2.925572186595005 ns/iter 2.466603360561875 ns/iter 1.19
JSON_Object_Defines_Miss_Too_Small 2.718249649963116 ns/iter 2.4130128544860567 ns/iter 1.13
JSON_Object_Defines_Miss_Too_Large 2.5559707004344143 ns/iter 2.4148075993888063 ns/iter 1.06
Pointer_Object_Traverse 17.134323446935063 ns/iter 17.136081343343275 ns/iter 1.00
Pointer_Object_Try_Traverse 24.383149683893286 ns/iter 24.589601881948305 ns/iter 0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer 197.63646902990922 ns/iter 194.64998084353888 ns/iter 1.02

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

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark (linux/llvm)

Benchmark suite Current: 32f08ad Previous: 514001a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.2050512387874956 ns/iter 2.20721554421779 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.2133154306637066 ns/iter 2.206285388328121 ns/iter 1.00
Regex_Period_Asterisk 2.2012901741780393 ns/iter 2.201432701242794 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 2.207811657735912 ns/iter 2.2133372681626606 ns/iter 1.00
Regex_Period_Plus 2.7985361671290168 ns/iter 2.799835018503954 ns/iter 1.00
Regex_Period 2.796764586974133 ns/iter 2.7963626117232607 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 2.5723747925543075 ns/iter 2.7991588517812476 ns/iter 0.92
Regex_Caret_Group_Period_Plus_Group_Dollar 2.7981650539947505 ns/iter 2.797277495344344 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 3.4193891778202787 ns/iter 3.416646187753847 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.4197174739966787 ns/iter 3.417477563680063 ns/iter 1.00
Regex_Caret_X_Hyphen 13.072647488173848 ns/iter 12.591959179417852 ns/iter 1.04
Regex_Period_Md_Dollar 81.42181245940239 ns/iter 81.70918920930372 ns/iter 1.00
Regex_Caret_Slash_Period_Asterisk 6.842858695849204 ns/iter 6.844252091524863 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 4.0487327974963225 ns/iter 4.040532126139264 ns/iter 1.00
Regex_Nested_Backtrack 494.07905326505045 ns/iter 500.0191541346797 ns/iter 0.99
JSON_Array_Of_Objects_Unique 411.7208253809518 ns/iter 404.9806391909687 ns/iter 1.02
JSON_Parse_1 30431.233809193825 ns/iter 30501.04911659018 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 58.451094197492765 ns/iter 58.46988820081462 ns/iter 1.00
JSON_Equality_Helm_Chart_Lock 149.40573471663004 ns/iter 145.62188792390634 ns/iter 1.03
JSON_String_Equal/10 6.226806037500554 ns/iter 7.148112807661105 ns/iter 0.87
JSON_String_Equal/100 6.849685508971541 ns/iter 6.84496456405244 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9349340346684696 ns/iter 0.9347368203045362 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.634331506503015 ns/iter 14.60084600454091 ns/iter 1.00
JSON_String_Fast_Hash/10 2.486387677696929 ns/iter 2.4863247847793777 ns/iter 1.00
JSON_String_Fast_Hash/100 2.4886060061438067 ns/iter 2.485352276415761 ns/iter 1.00
JSON_String_Key_Hash/10 2.676963179512288 ns/iter 2.6903715841438993 ns/iter 1.00
JSON_String_Key_Hash/100 1.881861828928084 ns/iter 1.866550116741216 ns/iter 1.01
JSON_Object_Defines_Miss_Same_Length 3.732354810678442 ns/iter 3.7330476930570877 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.7327104571903975 ns/iter 3.7372609388212257 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.7370353683927093 ns/iter 3.7344417368782805 ns/iter 1.00
Pointer_Object_Traverse 44.22833468570419 ns/iter 45.04234454921942 ns/iter 0.98
Pointer_Object_Try_Traverse 52.304825167989144 ns/iter 52.38964761935102 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 308.0664655172357 ns/iter 306.67659864935155 ns/iter 1.00

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

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark (windows/msvc)

Benchmark suite Current: 32f08ad Previous: 514001a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 7.147975446428438 ns/iter 7.16802343750013 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 7.502809787934586 ns/iter 6.853013392857932 ns/iter 1.09
Regex_Period_Asterisk 7.227042824878567 ns/iter 7.104960937500999 ns/iter 1.02
Regex_Group_Period_Asterisk_Group 7.08246093749944 ns/iter 7.076120535714888 ns/iter 1.00
Regex_Period_Plus 7.67855580357159 ns/iter 7.181934151785998 ns/iter 1.07
Regex_Period 7.46789460951887 ns/iter 7.45938746669926 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 7.425104910714354 ns/iter 7.159333705357389 ns/iter 1.04
Regex_Caret_Group_Period_Plus_Group_Dollar 7.226074776784941 ns/iter 7.246714253362148 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 6.864740594353845 ns/iter 6.9899832589280315 ns/iter 0.98
Regex_Caret_Group_Period_Asterisk_Group_Dollar 6.991833705357767 ns/iter 7.2105655928096075 ns/iter 0.97
Regex_Caret_X_Hyphen 11.850531249999463 ns/iter 11.806790624998342 ns/iter 1.00
Regex_Period_Md_Dollar 148.24158489991353 ns/iter 147.2870023532574 ns/iter 1.01
Regex_Caret_Slash_Period_Asterisk 10.644928571429498 ns/iter 10.342881250000602 ns/iter 1.03
Regex_Caret_Period_Range_Dollar 7.860719866071366 ns/iter 7.6865879121125635 ns/iter 1.02
Regex_Nested_Backtrack 638.666428571355 ns/iter 617.2209821428964 ns/iter 1.03
JSON_Array_Of_Objects_Unique 455.02657901079345 ns/iter 448.73014989374457 ns/iter 1.01
JSON_Parse_1 80027.64162314251 ns/iter 82239.72098214207 ns/iter 0.97
JSON_Fast_Hash_Helm_Chart_Lock 69.87543526784735 ns/iter 64.32880357142575 ns/iter 1.09
JSON_Equality_Helm_Chart_Lock 195.41790645457885 ns/iter 194.37308953692892 ns/iter 1.01
JSON_String_Equal/10 9.721643749999842 ns/iter 9.685406206761101 ns/iter 1.00
JSON_String_Equal/100 9.979635937499507 ns/iter 10.078443705007787 ns/iter 0.99
JSON_String_Equal_Small_By_Perfect_Hash/10 2.166455937500089 ns/iter 2.1735803124997233 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.709906250001126 ns/iter 14.726904017857226 ns/iter 1.00
JSON_String_Fast_Hash/10 3.7215407076398486 ns/iter 3.8073186383926125 ns/iter 0.98
JSON_String_Fast_Hash/100 3.7134037433689278 ns/iter 3.998909992859056 ns/iter 0.93
JSON_String_Key_Hash/10 7.503493303570506 ns/iter 7.439792857142485 ns/iter 1.01
JSON_String_Key_Hash/100 4.024878906249617 ns/iter 4.027064560762218 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.719395171929634 ns/iter 3.72483963620534 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.7128219576558097 ns/iter 3.717931064789373 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 4.961512499999036 ns/iter 4.972566071429137 ns/iter 1.00
Pointer_Object_Traverse 53.2645267857187 ns/iter 54.0291199999956 ns/iter 0.99
Pointer_Object_Try_Traverse 67.91901785713809 ns/iter 68.19486607143281 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 185.73593622640337 ns/iter 182.50040915180753 ns/iter 1.02

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

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark (macos/gcc)

Benchmark suite Current: 32f08ad Previous: 514001a Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.2832958426894554 ns/iter 2.3693760568177797 ns/iter 0.96
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.2327621949887217 ns/iter 2.2448386582671906 ns/iter 0.99
Regex_Period_Asterisk 2.5522930690091035 ns/iter 2.123902391095557 ns/iter 1.20
Regex_Group_Period_Asterisk_Group 2.3870303051087363 ns/iter 2.1872127726200303 ns/iter 1.09
Regex_Period_Plus 1.8560831524774686 ns/iter 1.7213223992555386 ns/iter 1.08
Regex_Period 1.8317757687395426 ns/iter 1.7138428317499859 ns/iter 1.07
Regex_Caret_Period_Plus_Dollar 2.2296130586190483 ns/iter 1.855178463070471 ns/iter 1.20
Regex_Caret_Group_Period_Plus_Group_Dollar 1.8695473004260552 ns/iter 1.9278339658814752 ns/iter 0.97
Regex_Caret_Period_Asterisk_Dollar 2.220666649089393 ns/iter 2.2867923243517594 ns/iter 0.97
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.4684305859070435 ns/iter 2.1365788952003926 ns/iter 1.16
Regex_Caret_X_Hyphen 7.44995902098891 ns/iter 6.84225116760729 ns/iter 1.09
Regex_Period_Md_Dollar 79.67971547930026 ns/iter 82.37052585317998 ns/iter 0.97
Regex_Caret_Slash_Period_Asterisk 4.9396724039931605 ns/iter 4.81132966830924 ns/iter 1.03
Regex_Caret_Period_Range_Dollar 2.5088013315851443 ns/iter 2.127269758391674 ns/iter 1.18
Regex_Nested_Backtrack 989.2720892096952 ns/iter 907.9269042650328 ns/iter 1.09
JSON_Array_Of_Objects_Unique 234.93904460842936 ns/iter 228.85143879599372 ns/iter 1.03
JSON_Parse_1 25662.577647870687 ns/iter 26037.432647533715 ns/iter 0.99
JSON_Fast_Hash_Helm_Chart_Lock 26.327074243768735 ns/iter 28.122970368354586 ns/iter 0.94
JSON_Equality_Helm_Chart_Lock 136.4379546677491 ns/iter 140.60225402023374 ns/iter 0.97
JSON_String_Equal/10 6.591113439334022 ns/iter 6.545865218294473 ns/iter 1.01
JSON_String_Equal/100 5.615534496315439 ns/iter 6.47271573593858 ns/iter 0.87
JSON_String_Equal_Small_By_Perfect_Hash/10 1.042296088572728 ns/iter 1.1136520112108483 ns/iter 0.94
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.8584516407740805 ns/iter 4.111133813363609 ns/iter 0.94
JSON_String_Fast_Hash/10 2.061697893151242 ns/iter 2.2405216723482977 ns/iter 0.92
JSON_String_Fast_Hash/100 2.081081571929755 ns/iter 2.489500392026669 ns/iter 0.84
JSON_String_Key_Hash/10 1.6007584462672948 ns/iter 1.5922804512911923 ns/iter 1.01
JSON_String_Key_Hash/100 2.120165809145354 ns/iter 2.1631746253194724 ns/iter 0.98
JSON_Object_Defines_Miss_Same_Length 1.924173899185013 ns/iter 1.9875953505595807 ns/iter 0.97
JSON_Object_Defines_Miss_Too_Small 2.2394217449608966 ns/iter 2.134561525546161 ns/iter 1.05
JSON_Object_Defines_Miss_Too_Large 2.860982020577568 ns/iter 1.858349234344484 ns/iter 1.54
Pointer_Object_Traverse 71.47409823587779 ns/iter 67.31134618268709 ns/iter 1.06
Pointer_Object_Try_Traverse 53.72751278460807 ns/iter 51.14937660567235 ns/iter 1.05
Pointer_Push_Back_Pointer_To_Weak_Pointer 199.35333580423142 ns/iter 217.29906371021696 ns/iter 0.92

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

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark (linux/gcc)

Benchmark suite Current: 32f08ad Previous: 514001a Ratio
Pointer_Object_Traverse 54.34749509404063 ns/iter 50.03110119999974 ns/iter 1.09
Pointer_Object_Try_Traverse 28.983666244883143 ns/iter 26.58273383154434 ns/iter 1.09
Pointer_Push_Back_Pointer_To_Weak_Pointer 154.076501832303 ns/iter 145.38519474774722 ns/iter 1.06
JSON_Array_Of_Objects_Unique 442.5835886261339 ns/iter 419.44591400226926 ns/iter 1.06
JSON_Parse_1 36112.565675629994 ns/iter 33573.51954287989 ns/iter 1.08
JSON_Fast_Hash_Helm_Chart_Lock 73.8561006466179 ns/iter 67.76144208726863 ns/iter 1.09
JSON_Equality_Helm_Chart_Lock 152.9936441745487 ns/iter 141.4998443385508 ns/iter 1.08
JSON_String_Equal/10 6.395072807502929 ns/iter 5.996309567234463 ns/iter 1.07
JSON_String_Equal/100 7.0058745913644715 ns/iter 6.619637489144734 ns/iter 1.06
JSON_String_Equal_Small_By_Perfect_Hash/10 0.6594379767577471 ns/iter 0.6253450731896726 ns/iter 1.05
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 15.216440897870488 ns/iter 14.287609630282242 ns/iter 1.07
JSON_String_Fast_Hash/10 1.008320928849041 ns/iter 0.9335810179591976 ns/iter 1.08
JSON_String_Fast_Hash/100 1.0031880991937727 ns/iter 0.9447758818682191 ns/iter 1.06
JSON_String_Key_Hash/10 1.8199935868715253 ns/iter 1.7144052898539979 ns/iter 1.06
JSON_String_Key_Hash/100 2.1813446860624146 ns/iter 2.022289023313868 ns/iter 1.08
JSON_Object_Defines_Miss_Same_Length 3.3377526112056084 ns/iter 3.118309951236335 ns/iter 1.07
JSON_Object_Defines_Miss_Too_Small 2.9942160340396624 ns/iter 2.800464380625936 ns/iter 1.07
JSON_Object_Defines_Miss_Too_Large 2.6439884647410943 ns/iter 2.48754715146793 ns/iter 1.06
Regex_Lower_S_Or_Upper_S_Asterisk 3.059171091366654 ns/iter 2.8010924825006738 ns/iter 1.09
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 3.023870882684113 ns/iter 2.7961573275609193 ns/iter 1.08
Regex_Period_Asterisk 3.0066731142515315 ns/iter 2.8001857838782303 ns/iter 1.07
Regex_Group_Period_Asterisk_Group 3.0254330819692563 ns/iter 2.8114902252964193 ns/iter 1.08
Regex_Period_Plus 3.705628640089904 ns/iter 3.418893723568376 ns/iter 1.08
Regex_Period 3.341474013853179 ns/iter 3.418530807646378 ns/iter 0.98
Regex_Caret_Period_Plus_Dollar 3.327684905453914 ns/iter 3.4214362809481313 ns/iter 0.97
Regex_Caret_Group_Period_Plus_Group_Dollar 3.310499342131012 ns/iter 3.4224850805815525 ns/iter 0.97
Regex_Caret_Period_Asterisk_Dollar 3.3089294795128765 ns/iter 4.039318147642145 ns/iter 0.82
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.3346111597559487 ns/iter 4.0498905771768845 ns/iter 0.82
Regex_Caret_X_Hyphen 13.23425534471811 ns/iter 13.050701570877218 ns/iter 1.01
Regex_Period_Md_Dollar 99.91438374615716 ns/iter 95.62782995187261 ns/iter 1.04
Regex_Caret_Slash_Period_Asterisk 7.910727968161967 ns/iter 7.4627480821582175 ns/iter 1.06
Regex_Caret_Period_Range_Dollar 4.684097184433108 ns/iter 3.7027242815238797 ns/iter 1.27
Regex_Nested_Backtrack 944.3808752434552 ns/iter 827.6865807140101 ns/iter 1.14

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

Please sign in to comment.