Skip to content

[WIP] Implement a cross-platform stack trace printer#2418

Draft
jviotti wants to merge 9 commits into
mainfrom
stacktrace
Draft

[WIP] Implement a cross-platform stack trace printer#2418
jviotti wants to merge 9 commits into
mainfrom
stacktrace

Conversation

@jviotti
Copy link
Copy Markdown
Member

@jviotti jviotti commented May 26, 2026

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

@jviotti jviotti force-pushed the stacktrace branch 7 times, most recently from 7ac4e62 to 3a4410d Compare May 26, 2026 19:08
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

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: b5cfad0 Previous: f8eb65e Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.094570797433428 ns/iter 1.8795876537524037 ns/iter 1.11
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.9779683432459745 ns/iter 1.5717591219433469 ns/iter 1.26
Regex_Period_Asterisk 1.7945226975203623 ns/iter 1.6517777726408824 ns/iter 1.09
Regex_Group_Period_Asterisk_Group 1.835321932515269 ns/iter 1.5928529994867613 ns/iter 1.15
Regex_Period_Plus 2.0652719923613128 ns/iter 1.8931534349506296 ns/iter 1.09
Regex_Period 2.0983117004911755 ns/iter 1.9640772579477441 ns/iter 1.07
Regex_Caret_Period_Plus_Dollar 2.0782330118531074 ns/iter 1.9748255424921448 ns/iter 1.05
Regex_Caret_Group_Period_Plus_Group_Dollar 2.0510564444867185 ns/iter 1.98726277993817 ns/iter 1.03
Regex_Caret_Period_Asterisk_Dollar 1.6854469261436882 ns/iter 1.6335872562010623 ns/iter 1.03
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.7017125894062264 ns/iter 1.6234298750366922 ns/iter 1.05
Regex_Caret_X_Hyphen 5.898552905911161 ns/iter 5.645882318815099 ns/iter 1.04
Regex_Period_Md_Dollar 16.13008731150095 ns/iter 15.39077116273156 ns/iter 1.05
Regex_Caret_Slash_Period_Asterisk 8.028416450084206 ns/iter 7.434182762271429 ns/iter 1.08
Regex_Caret_Period_Range_Dollar 2.081080166883386 ns/iter 1.5678528160160135 ns/iter 1.33
Regex_Nested_Backtrack 24.31229578300165 ns/iter 24.260989336424817 ns/iter 1.00
JSON_Array_Of_Objects_Unique 427.9901354087127 ns/iter 397.1712229508968 ns/iter 1.08
JSON_Parse_1 3805.2124246775543 ns/iter 3614.4365986784414 ns/iter 1.05
JSON_Parse_Real 6416.837470605123 ns/iter 5919.27420475901 ns/iter 1.08
JSON_Parse_Decimal 8122.0977280849 ns/iter 7458.919043525845 ns/iter 1.09
JSON_Parse_Schema_ISO_Language 3240072.055045794 ns/iter 2889479.079497897 ns/iter 1.12
JSON_Fast_Hash_Helm_Chart_Lock 58.79772638631775 ns/iter 55.23983512458455 ns/iter 1.06
JSON_Equality_Helm_Chart_Lock 133.29340133479295 ns/iter 125.34403686443811 ns/iter 1.06
JSON_Divisible_By_Decimal 167.05573766047277 ns/iter 161.30000604651923 ns/iter 1.04
JSON_String_Equal/10 6.900739724980339 ns/iter 6.264093172866301 ns/iter 1.10
JSON_String_Equal/100 7.221667727978086 ns/iter 7.138599178381018 ns/iter 1.01
JSON_String_Equal_Small_By_Perfect_Hash/10 0.8365995530316997 ns/iter 0.7381140662674379 ns/iter 1.13
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.695403954067835 ns/iter 3.3966988300961343 ns/iter 1.09
JSON_String_Fast_Hash/10 2.5230852731085123 ns/iter 2.4400739062446437 ns/iter 1.03
JSON_String_Fast_Hash/100 2.199669640571991 ns/iter 2.364020317099589 ns/iter 0.93
JSON_String_Key_Hash/10 1.4031429866558862 ns/iter 1.3627476810879209 ns/iter 1.03
JSON_String_Key_Hash/100 2.3438813314253273 ns/iter 2.0496609409645403 ns/iter 1.14
JSON_Object_Defines_Miss_Same_Length 2.5541525202066886 ns/iter 2.851039332225346 ns/iter 0.90
JSON_Object_Defines_Miss_Too_Small 2.5159430043790203 ns/iter 2.317272764798418 ns/iter 1.09
JSON_Object_Defines_Miss_Too_Large 2.5918137159171 ns/iter 2.192696077603658 ns/iter 1.18
Pointer_Object_Traverse 14.731114578726858 ns/iter 12.939393983503942 ns/iter 1.14
Pointer_Object_Try_Traverse 20.251279869176003 ns/iter 17.85237801843437 ns/iter 1.13
Pointer_Push_Back_Pointer_To_Weak_Pointer 157.32617814971383 ns/iter 145.53320012388292 ns/iter 1.08
Pointer_Walker_Schema_ISO_Language 4374167.215686303 ns/iter 3570233.3860760657 ns/iter 1.23
Pointer_Maybe_Tracked_Deeply_Nested/0 918782.755555488 ns/iter 898711.5583756042 ns/iter 1.02
Pointer_Maybe_Tracked_Deeply_Nested/1 1411997.0116276578 ns/iter 1228425.7880910668 ns/iter 1.15
Pointer_Position_Tracker_Get_Deeply_Nested 357.2200501937446 ns/iter 325.7711651010444 ns/iter 1.10
URITemplateRouter_Create 22361.13527884933 ns/iter 21178.120553420333 ns/iter 1.06
URITemplateRouter_Match 179.8210940003199 ns/iter 151.66168754050844 ns/iter 1.19
URITemplateRouter_Match_BasePath 207.39819859921772 ns/iter 192.79057994736982 ns/iter 1.08
URITemplateRouterView_Restore 10918.197131523033 ns/iter 9265.166624163188 ns/iter 1.18
URITemplateRouterView_Match 136.03672273560147 ns/iter 126.28610554901408 ns/iter 1.08
URITemplateRouterView_Match_BasePath 152.97839400759432 ns/iter 141.75310074460583 ns/iter 1.08
URITemplateRouterView_Arguments 422.1125504705978 ns/iter 424.85161179833034 ns/iter 0.99
JSONL_Parse_Large 19115965.79487032 ns/iter 11992207.589287316 ns/iter 1.59
JSONL_Parse_Large_GZIP 14405957.3170724 ns/iter 12170415.94827606 ns/iter 1.18
HTML_Build_Table_100000 72332408.39998415 ns/iter 65169779.199993625 ns/iter 1.11
HTML_Render_Table_100000 4314092.2822089335 ns/iter 2390325.3749999464 ns/iter 1.80
GZIP_Compress_ISO_Language_Set_3_Locations 31318981.86956792 ns/iter 25849492.29629661 ns/iter 1.21
GZIP_Decompress_ISO_Language_Set_3_Locations 5688112.564516154 ns/iter 4529642.358974319 ns/iter 1.26
GZIP_Compress_ISO_Language_Set_3_Schema 1663006.856041248 ns/iter 1481838.5000000945 ns/iter 1.12
GZIP_Decompress_ISO_Language_Set_3_Schema 306267.72222219897 ns/iter 263051.5538116642 ns/iter 1.16

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

jviotti added 3 commits May 26, 2026 16:07
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>
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

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: b5cfad0 Previous: f8eb65e Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.464062660287493 ns/iter 2.215292221414967 ns/iter 1.11
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.464342749852297 ns/iter 2.191178592373472 ns/iter 1.12
Regex_Period_Asterisk 2.4616764339689907 ns/iter 2.1803593431848816 ns/iter 1.13
Regex_Group_Period_Asterisk_Group 2.4611910476386845 ns/iter 2.1958664062667657 ns/iter 1.12
Regex_Period_Plus 3.5141949035079345 ns/iter 2.496052291914258 ns/iter 1.41
Regex_Period 3.8658988390058626 ns/iter 2.806076317542879 ns/iter 1.38
Regex_Caret_Period_Plus_Dollar 3.5151707651447763 ns/iter 2.4995384304071533 ns/iter 1.41
Regex_Caret_Group_Period_Plus_Group_Dollar 3.8676723606933585 ns/iter 2.8026776028570892 ns/iter 1.38
Regex_Caret_Period_Asterisk_Dollar 2.461437416181404 ns/iter 3.1131286865800134 ns/iter 0.79
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.8146515266307444 ns/iter 3.4241843177312528 ns/iter 0.82
Regex_Caret_X_Hyphen 6.6792948326075265 ns/iter 7.164030919623724 ns/iter 0.93
Regex_Period_Md_Dollar 26.705521679683574 ns/iter 27.718342142457843 ns/iter 0.96
Regex_Caret_Slash_Period_Asterisk 7.337668088269949 ns/iter 6.847800299572635 ns/iter 1.07
Regex_Caret_Period_Range_Dollar 4.221110884062017 ns/iter 4.047090916607818 ns/iter 1.04
Regex_Nested_Backtrack 36.80816029652642 ns/iter 37.16564024276451 ns/iter 0.99
JSON_Array_Of_Objects_Unique 421.5832655273544 ns/iter 418.213732682568 ns/iter 1.01
JSON_Parse_1 5773.945698148539 ns/iter 5888.019096486657 ns/iter 0.98
JSON_Parse_Real 10359.541790185951 ns/iter 10679.234363525855 ns/iter 0.97
JSON_Parse_Decimal 11157.917797925124 ns/iter 11164.65820570334 ns/iter 1.00
JSON_Parse_Schema_ISO_Language 3704061.5631583836 ns/iter 3567116.1734691327 ns/iter 1.04
JSON_Fast_Hash_Helm_Chart_Lock 73.51675475251375 ns/iter 61.048209321835174 ns/iter 1.20
JSON_Equality_Helm_Chart_Lock 168.19434142281094 ns/iter 156.02531468432167 ns/iter 1.08
JSON_Divisible_By_Decimal 248.5555096170519 ns/iter 254.3407880382689 ns/iter 0.98
JSON_String_Equal/10 5.986327475084464 ns/iter 6.2361383772520655 ns/iter 0.96
JSON_String_Equal/100 6.683705145942273 ns/iter 6.858382665567113 ns/iter 0.97
JSON_String_Equal_Small_By_Perfect_Hash/10 1.0542455497080347 ns/iter 0.9371191508820991 ns/iter 1.12
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 12.348907611045366 ns/iter 10.277400320872626 ns/iter 1.20
JSON_String_Fast_Hash/10 2.8148886757083083 ns/iter 2.803263299388051 ns/iter 1.00
JSON_String_Fast_Hash/100 2.818297514251948 ns/iter 2.804317563716543 ns/iter 1.00
JSON_String_Key_Hash/10 2.4805179917325733 ns/iter 2.183622165884282 ns/iter 1.14
JSON_String_Key_Hash/100 7.733139646942017 ns/iter 6.538540232940972 ns/iter 1.18
JSON_Object_Defines_Miss_Same_Length 4.220690154581789 ns/iter 3.7428222923831744 ns/iter 1.13
JSON_Object_Defines_Miss_Too_Small 4.224522427061001 ns/iter 3.741873339565375 ns/iter 1.13
JSON_Object_Defines_Miss_Too_Large 4.222883775724582 ns/iter 3.741826820223902 ns/iter 1.13
Pointer_Object_Traverse 27.273853873009774 ns/iter 24.16751691971528 ns/iter 1.13
Pointer_Object_Try_Traverse 30.212480738634575 ns/iter 26.15253044897301 ns/iter 1.16
Pointer_Push_Back_Pointer_To_Weak_Pointer 175.7130816387535 ns/iter 152.92527613761823 ns/iter 1.15
Pointer_Walker_Schema_ISO_Language 3220216.4545455244 ns/iter 3059067.908297173 ns/iter 1.05
Pointer_Maybe_Tracked_Deeply_Nested/0 1428947.713402147 ns/iter 1413261.8211380586 ns/iter 1.01
Pointer_Maybe_Tracked_Deeply_Nested/1 1804522.3659793553 ns/iter 1873829.5093335183 ns/iter 0.96
Pointer_Position_Tracker_Get_Deeply_Nested 625.6012499303916 ns/iter 681.4852125647209 ns/iter 0.92
URITemplateRouter_Create 30621.54948430859 ns/iter 32139.59535563874 ns/iter 0.95
URITemplateRouter_Match 178.96241591093 ns/iter 173.35214153012987 ns/iter 1.03
URITemplateRouter_Match_BasePath 219.47761345441683 ns/iter 201.26270727031823 ns/iter 1.09
URITemplateRouterView_Restore 8688.431219404067 ns/iter 7942.306983693034 ns/iter 1.09
URITemplateRouterView_Match 145.3642381998941 ns/iter 146.47013294164296 ns/iter 0.99
URITemplateRouterView_Match_BasePath 163.40237105622978 ns/iter 165.2029396547531 ns/iter 0.99
URITemplateRouterView_Arguments 472.6004529094819 ns/iter 473.2922650239849 ns/iter 1.00
JSONL_Parse_Large 10177478.739131177 ns/iter 11129561.476190291 ns/iter 0.91
JSONL_Parse_Large_GZIP 11496039.409835845 ns/iter 12207282.912279943 ns/iter 0.94
HTML_Build_Table_100000 81492097.0000088 ns/iter 66975764.000000544 ns/iter 1.22
HTML_Render_Table_100000 4735217.148648288 ns/iter 5523568.59349572 ns/iter 0.86
GZIP_Compress_ISO_Language_Set_3_Locations 36342158.63157926 ns/iter 33920808.52381154 ns/iter 1.07
GZIP_Decompress_ISO_Language_Set_3_Locations 4640192.794702081 ns/iter 5139671.422222347 ns/iter 0.90
GZIP_Compress_ISO_Language_Set_3_Schema 2126462.5333336 ns/iter 1885118.4070080237 ns/iter 1.13
GZIP_Decompress_ISO_Language_Set_3_Schema 289800.2237878063 ns/iter 376679.504597079 ns/iter 0.77

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

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

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: b5cfad0 Previous: f8eb65e Ratio
GZIP_Compress_ISO_Language_Set_3_Locations 38865290.333332166 ns/iter 38547023.27777836 ns/iter 1.01
GZIP_Decompress_ISO_Language_Set_3_Locations 5039471.2799999295 ns/iter 4621498.173333596 ns/iter 1.09
GZIP_Compress_ISO_Language_Set_3_Schema 2091221.8765060736 ns/iter 2081598.4243323107 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Schema 395600.3469387932 ns/iter 395399.1569734584 ns/iter 1.00
HTML_Build_Table_100000 59307129.50000346 ns/iter 59630982.91666806 ns/iter 0.99
HTML_Render_Table_100000 1822675.0181347749 ns/iter 1914627.9863387232 ns/iter 0.95
JSONL_Parse_Large 12881519.296295587 ns/iter 13005601.20370375 ns/iter 0.99
JSONL_Parse_Large_GZIP 14006132.30612296 ns/iter 14105786.479999552 ns/iter 0.99
URITemplateRouter_Create 30317.87222055135 ns/iter 29913.295020465182 ns/iter 1.01
URITemplateRouter_Match 176.65041452604027 ns/iter 174.4086241661371 ns/iter 1.01
URITemplateRouter_Match_BasePath 200.8406623677106 ns/iter 198.32576234674855 ns/iter 1.01
URITemplateRouterView_Restore 7701.419524896893 ns/iter 7778.554877777063 ns/iter 0.99
URITemplateRouterView_Match 141.37297975575362 ns/iter 141.14552988153062 ns/iter 1.00
URITemplateRouterView_Match_BasePath 162.15839229695285 ns/iter 161.77262308282738 ns/iter 1.00
URITemplateRouterView_Arguments 475.29503897377026 ns/iter 474.83422094558216 ns/iter 1.00
Pointer_Object_Traverse 26.574258144828235 ns/iter 26.614978145349944 ns/iter 1.00
Pointer_Object_Try_Traverse 22.451363294058357 ns/iter 22.445691891507145 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 149.1621750498044 ns/iter 136.98228547731483 ns/iter 1.09
Pointer_Walker_Schema_ISO_Language 3288754.8967135833 ns/iter 3261289.5841120854 ns/iter 1.01
Pointer_Maybe_Tracked_Deeply_Nested/0 1612103.7096774655 ns/iter 1606072.890160157 ns/iter 1.00
Pointer_Maybe_Tracked_Deeply_Nested/1 1808802.567357472 ns/iter 1778074.2005076376 ns/iter 1.02
Pointer_Position_Tracker_Get_Deeply_Nested 439.58444912894225 ns/iter 539.7978462210843 ns/iter 0.81
JSON_Array_Of_Objects_Unique 415.79774258158074 ns/iter 416.3596357855783 ns/iter 1.00
JSON_Parse_1 7979.07480565535 ns/iter 8040.642382055607 ns/iter 0.99
JSON_Parse_Real 12123.994318673811 ns/iter 12083.623394092829 ns/iter 1.00
JSON_Parse_Decimal 17805.502034340116 ns/iter 17825.74094530321 ns/iter 1.00
JSON_Parse_Schema_ISO_Language 4605524.36666679 ns/iter 4644324.927152492 ns/iter 0.99
JSON_Fast_Hash_Helm_Chart_Lock 68.89607859780743 ns/iter 71.66295047142962 ns/iter 0.96
JSON_Equality_Helm_Chart_Lock 149.56103804584 ns/iter 149.28576588094342 ns/iter 1.00
JSON_Divisible_By_Decimal 237.2810782678474 ns/iter 238.236670151245 ns/iter 1.00
JSON_String_Equal/10 5.728849693364754 ns/iter 5.732101622424784 ns/iter 1.00
JSON_String_Equal/100 6.356323742810742 ns/iter 6.458052080268333 ns/iter 0.98
JSON_String_Equal_Small_By_Perfect_Hash/10 0.6235185664021393 ns/iter 0.624584164429114 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 25.21497687419913 ns/iter 25.208443082485 ns/iter 1.00
JSON_String_Fast_Hash/10 1.556986290991504 ns/iter 1.5586257633255636 ns/iter 1.00
JSON_String_Fast_Hash/100 1.5570619949149138 ns/iter 1.5576553671469573 ns/iter 1.00
JSON_String_Key_Hash/10 1.246856002807906 ns/iter 1.2470899252740348 ns/iter 1.00
JSON_String_Key_Hash/100 12.442708874899374 ns/iter 12.453011311487069 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 3.433579760110566 ns/iter 3.4262356750654313 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.124473021366076 ns/iter 3.115056666869608 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.7363939295327104 ns/iter 3.7345976967430228 ns/iter 1.00
Regex_Lower_S_Or_Upper_S_Asterisk 0.6231512493654944 ns/iter 0.6233710760334179 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.6228659424467353 ns/iter 0.6239340408985884 ns/iter 1.00
Regex_Period_Asterisk 0.9340547251995422 ns/iter 0.934142375537327 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 0.9414548532338668 ns/iter 0.9346929233102648 ns/iter 1.01
Regex_Period_Plus 0.6264056714830009 ns/iter 0.6227735898672433 ns/iter 1.01
Regex_Period 0.6251841794165248 ns/iter 0.623307592898947 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 0.9346967885039903 ns/iter 0.9354248210579895 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 0.9344945579912869 ns/iter 0.9356482041922243 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 0.6231654269856243 ns/iter 0.6232463924405047 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.6238729394370639 ns/iter 0.6235406993401684 ns/iter 1.00
Regex_Caret_X_Hyphen 4.051321758934076 ns/iter 4.052680988097851 ns/iter 1.00
Regex_Period_Md_Dollar 29.415304829208278 ns/iter 47.13507052548519 ns/iter 0.62
Regex_Caret_Slash_Period_Asterisk 4.670208501074065 ns/iter 4.6701023515766105 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 0.7796307007710258 ns/iter 0.778379580960664 ns/iter 1.00
Regex_Nested_Backtrack 36.79622382445357 ns/iter 45.31179690897213 ns/iter 0.81

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

jviotti added 4 commits May 26, 2026 17:13
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>
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