Skip to content

Implement a non-atomic file writing utility#2377

Merged
jviotti merged 1 commit into
mainfrom
non-atomic-write
May 13, 2026
Merged

Implement a non-atomic file writing utility#2377
jviotti merged 1 commit into
mainfrom
non-atomic-write

Conversation

@jviotti
Copy link
Copy Markdown
Member

@jviotti jviotti commented May 13, 2026

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

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 13, 2026

🤖 Augment PR Summary

Summary: This PR adds a simple, non-atomic file writing utility to complement the existing atomic writer.

Changes:

  • Introduces three overloads of sourcemeta::core::write_file for writing std::string_view, std::span<const std::byte>, or via a callback that writes to an std::ostream.
  • Adds a shared open_file_for_write helper that creates parent directories, opens in binary|trunc mode, and maps EACCES to IOFilePermissionError.
  • Extends the public io.h API surface (new includes + declarations) to expose the new helper functions.
  • Adds a dedicated unit test suite covering creation, overwriting, directory creation, exact byte writes, and callback semantics (including partial writes on callback exceptions).
  • Registers the new test file in test/io/CMakeLists.txt.

Technical Notes: The new API is intentionally non-atomic (no staging file), and the tests explicitly validate that callback exceptions may leave a truncated/partial destination.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

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/lang/io/io.cc
auto write_file(const std::filesystem::path &path,
const std::function<void(std::ostream &)> &writer) -> void {
auto stream{open_file_for_write(path)};
writer(stream);
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 13, 2026

Choose a reason for hiding this comment

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

src/lang/io/io.cc:144: If writer throws, stream.flush()/stream.close() are skipped, and the std::ofstream still has failbit|badbit exceptions enabled; if closing the stream then fails during stack unwinding (e.g. I/O error), this can risk std::terminate (similar to why AtomicFileWriter disables exceptions before closing in its destructor). Consider making the exceptional path explicitly close the stream with exceptions disabled so callback exceptions don’t turn into termination on close failures.

Severity: medium

Other Locations
  • src/lang/io/io.cc:127
  • src/lang/io/io.cc:135

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

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: b1b86f6 Previous: 4707860 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.7310441867452282 ns/iter 1.9164708044557333 ns/iter 0.90
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.7296777158371133 ns/iter 1.7337440954396883 ns/iter 1.00
Regex_Period_Asterisk 1.7006987391632278 ns/iter 1.7148753040841493 ns/iter 0.99
Regex_Group_Period_Asterisk_Group 1.6817536739348182 ns/iter 1.7394005086814943 ns/iter 0.97
Regex_Period_Plus 1.9934186094539905 ns/iter 2.0843421163064577 ns/iter 0.96
Regex_Period 2.2854544186997594 ns/iter 2.0358330677706613 ns/iter 1.12
Regex_Caret_Period_Plus_Dollar 2.537375875890915 ns/iter 2.1359666781804263 ns/iter 1.19
Regex_Caret_Group_Period_Plus_Group_Dollar 2.070673604242397 ns/iter 2.175400118603611 ns/iter 0.95
Regex_Caret_Period_Asterisk_Dollar 1.7292655634805953 ns/iter 1.768398607188055 ns/iter 0.98
Regex_Caret_Group_Period_Asterisk_Group_Dollar 1.699666485038705 ns/iter 2.1144069163383077 ns/iter 0.80
Regex_Caret_X_Hyphen 6.059448836242802 ns/iter 6.990462559906762 ns/iter 0.87
Regex_Period_Md_Dollar 16.45039731015238 ns/iter 25.88325853806402 ns/iter 0.64
Regex_Caret_Slash_Period_Asterisk 8.018343695435716 ns/iter 9.265577615440026 ns/iter 0.87
Regex_Caret_Period_Range_Dollar 1.8263528637901185 ns/iter 1.731664165263211 ns/iter 1.05
Regex_Nested_Backtrack 24.730164549254773 ns/iter 24.430663295549085 ns/iter 1.01
JSON_Array_Of_Objects_Unique 341.1996187550086 ns/iter 341.00690050764865 ns/iter 1.00
JSON_Parse_1 3911.5114060324217 ns/iter 3923.241365646896 ns/iter 1.00
JSON_Parse_Real 6363.266855010994 ns/iter 6374.988637137217 ns/iter 1.00
JSON_Parse_Decimal 8435.770534550247 ns/iter 8123.304350936275 ns/iter 1.04
JSON_Parse_Schema_ISO_Language 4583442.200001012 ns/iter 4396554.216867456 ns/iter 1.04
JSON_Fast_Hash_Helm_Chart_Lock 57.95410528511114 ns/iter 62.993156188054286 ns/iter 0.92
JSON_Equality_Helm_Chart_Lock 123.94609286666359 ns/iter 160.89520680240085 ns/iter 0.77
JSON_Divisible_By_Decimal 181.26986682743458 ns/iter 179.25577381898347 ns/iter 1.01
JSON_String_Equal/10 6.622145139417708 ns/iter 6.752011637906269 ns/iter 0.98
JSON_String_Equal/100 6.212794549224713 ns/iter 7.454045493411747 ns/iter 0.83
JSON_String_Equal_Small_By_Perfect_Hash/10 0.7547785075887615 ns/iter 0.8984124492709898 ns/iter 0.84
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 3.3913941413634046 ns/iter 3.493425169616726 ns/iter 0.97
JSON_String_Fast_Hash/10 2.367951218475525 ns/iter 2.405405770867503 ns/iter 0.98
JSON_String_Fast_Hash/100 2.0855657709589845 ns/iter 2.0665815607660836 ns/iter 1.01
JSON_String_Key_Hash/10 1.3881683914747447 ns/iter 1.392746422729349 ns/iter 1.00
JSON_String_Key_Hash/100 2.24693792282928 ns/iter 2.1922800309810735 ns/iter 1.02
JSON_Object_Defines_Miss_Same_Length 2.9347105948964756 ns/iter 2.5502554987949733 ns/iter 1.15
JSON_Object_Defines_Miss_Too_Small 2.869159890778829 ns/iter 2.4364018078720324 ns/iter 1.18
JSON_Object_Defines_Miss_Too_Large 2.4276483206375192 ns/iter 2.376818597902591 ns/iter 1.02
Pointer_Object_Traverse 14.173888112245049 ns/iter 13.93235248983062 ns/iter 1.02
Pointer_Object_Try_Traverse 20.226982225299267 ns/iter 19.24601924396576 ns/iter 1.05
Pointer_Push_Back_Pointer_To_Weak_Pointer 188.55635424899623 ns/iter 159.0044633071697 ns/iter 1.19
Pointer_Walker_Schema_ISO_Language 5679963.913386147 ns/iter 5443241.369368628 ns/iter 1.04
Pointer_Maybe_Tracked_Deeply_Nested/0 1430497.7444030964 ns/iter 1041763.0175181103 ns/iter 1.37
Pointer_Maybe_Tracked_Deeply_Nested/1 1450137.4834707319 ns/iter 1323910.4391145685 ns/iter 1.10
Pointer_Position_Tracker_Get_Deeply_Nested 354.77963479784563 ns/iter 349.31291375171213 ns/iter 1.02
Schema_Frame_WoT_References 4830248.893332888 ns/iter 4776755.666667595 ns/iter 1.01
Schema_Frame_OMC_References 26627999.999994963 ns/iter 26842432.692310818 ns/iter 0.99
Schema_Frame_OMC_Locations 27715070.37930954 ns/iter 25272516.357144274 ns/iter 1.10
Schema_Frame_ISO_Language_Locations 78286565.428568 ns/iter 73963802.1250073 ns/iter 1.06
Schema_Frame_KrakenD_References 45625180.60000305 ns/iter 48226372.07143998 ns/iter 0.95
Schema_Frame_KrakenD_Reachable 353797958.4999675 ns/iter 403316082.99993604 ns/iter 0.88
Schema_Iterator_ISO_Language 2065022.2375364958 ns/iter 2264606.9023568677 ns/iter 0.91
Schema_Frame_ISO_Language_Locations_To_JSON 95505720.28570059 ns/iter 92079979.16666955 ns/iter 1.04
Schema_Tracker_ISO_Language 4822426.04166648 ns/iter 6947582.479592618 ns/iter 0.69
Schema_Tracker_ISO_Language_To_JSON 13049882.722220395 ns/iter 14164369.791667277 ns/iter 0.92
Schema_Format_ISO_Language_To_JSON 70967638.88896222 ns/iter 74973689.66667435 ns/iter 0.95
Schema_Bundle_Meta_2020_12 1255088.0359073356 ns/iter 1311068.3575465048 ns/iter 0.96
Schema_Frame_Many_Resources_References 269334645.4999528 ns/iter 319448353.9999737 ns/iter 0.84
EditorSchema_ForEditor_EmbeddedResources 10849691.882359525 ns/iter 11053731.448304588 ns/iter 0.98
URITemplateRouter_Create 27104.697747975395 ns/iter 25880.64367219533 ns/iter 1.05
URITemplateRouter_Match 180.97100927873686 ns/iter 164.76915829734153 ns/iter 1.10
URITemplateRouter_Match_BasePath 185.44332504988694 ns/iter 193.90256657742705 ns/iter 0.96
URITemplateRouterView_Restore 8942.549130351057 ns/iter 9418.789585971617 ns/iter 0.95
URITemplateRouterView_Match 125.07743547982408 ns/iter 130.8322012503441 ns/iter 0.96
URITemplateRouterView_Match_BasePath 142.84864448156003 ns/iter 149.15239144741108 ns/iter 0.96
URITemplateRouterView_Arguments 392.08853967782807 ns/iter 439.67191204609674 ns/iter 0.89
JSONL_Parse_Large 11780048.033897093 ns/iter 14865142.268291026 ns/iter 0.79
JSONL_Parse_Large_GZIP 13724023.584906187 ns/iter 13111179.725487377 ns/iter 1.05
HTML_Build_Table_100000 65913870.800000034 ns/iter 66456124.999990605 ns/iter 0.99
HTML_Render_Table_100000 4779762.012269503 ns/iter 4461008.811428785 ns/iter 1.07

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/llvm)

Details
Benchmark suite Current: b1b86f6 Previous: 4707860 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.4978758249100426 ns/iter 2.2314668130562274 ns/iter 1.12
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.1787981672573893 ns/iter 2.1889407536105154 ns/iter 1.00
Regex_Period_Asterisk 2.489103905220657 ns/iter 2.1577800874934434 ns/iter 1.15
Regex_Group_Period_Asterisk_Group 2.180229642257282 ns/iter 1.9597947887192149 ns/iter 1.11
Regex_Period_Plus 3.112869696248228 ns/iter 2.3054629862545943 ns/iter 1.35
Regex_Period 2.8121415107353487 ns/iter 2.0398425715652655 ns/iter 1.38
Regex_Caret_Period_Plus_Dollar 3.111165668787838 ns/iter 2.30662942895673 ns/iter 1.35
Regex_Caret_Group_Period_Plus_Group_Dollar 2.800890823060078 ns/iter 2.023482704635925 ns/iter 1.38
Regex_Caret_Period_Asterisk_Dollar 3.7341113100363565 ns/iter 2.2144658322496116 ns/iter 1.69
Regex_Caret_Group_Period_Asterisk_Group_Dollar 3.4225759339801134 ns/iter 2.2190461471178127 ns/iter 1.54
Regex_Caret_X_Hyphen 6.850624460553854 ns/iter 4.033047999256882 ns/iter 1.70
Regex_Period_Md_Dollar 27.305778291922387 ns/iter 25.807558764758355 ns/iter 1.06
Regex_Caret_Slash_Period_Asterisk 6.222073208699358 ns/iter 4.035882330400921 ns/iter 1.54
Regex_Caret_Period_Range_Dollar 3.732950679262379 ns/iter 1.9124938710076989 ns/iter 1.95
Regex_Nested_Backtrack 37.429617039663455 ns/iter 33.96733293175782 ns/iter 1.10
JSON_Array_Of_Objects_Unique 422.0163812194905 ns/iter 354.9222161872645 ns/iter 1.19
JSON_Parse_1 5817.7599290812905 ns/iter 5209.660180386719 ns/iter 1.12
JSON_Parse_Real 10993.076655765693 ns/iter 10033.764419895882 ns/iter 1.10
JSON_Parse_Decimal 11852.125245845056 ns/iter 9928.343218058439 ns/iter 1.19
JSON_Parse_Schema_ISO_Language 3629803.4218749106 ns/iter 3323022.4147463087 ns/iter 1.09
JSON_Fast_Hash_Helm_Chart_Lock 60.37465747907193 ns/iter 53.98705658532176 ns/iter 1.12
JSON_Equality_Helm_Chart_Lock 157.23623144486547 ns/iter 131.90076734817217 ns/iter 1.19
JSON_Divisible_By_Decimal 247.62525573971686 ns/iter 254.06104573976893 ns/iter 0.97
JSON_String_Equal/10 5.919289166879603 ns/iter 4.616785090971773 ns/iter 1.28
JSON_String_Equal/100 6.546698148330079 ns/iter 5.7637672751459466 ns/iter 1.14
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9349357669563888 ns/iter 0.6919303638186712 ns/iter 1.35
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.624200388149292 ns/iter 9.805623669726087 ns/iter 1.49
JSON_String_Fast_Hash/10 2.619438694228508 ns/iter 2.0241857170855138 ns/iter 1.29
JSON_String_Fast_Hash/100 2.489719044853305 ns/iter 2.019299151445509 ns/iter 1.23
JSON_String_Key_Hash/10 2.55831709534671 ns/iter 1.7311909496881064 ns/iter 1.48
JSON_String_Key_Hash/100 9.033823298563506 ns/iter 7.199036849160175 ns/iter 1.25
JSON_Object_Defines_Miss_Same_Length 3.7389267656429226 ns/iter 3.6037532315850815 ns/iter 1.04
JSON_Object_Defines_Miss_Too_Small 3.744097444350109 ns/iter 3.4022960327415412 ns/iter 1.10
JSON_Object_Defines_Miss_Too_Large 3.7426249281847634 ns/iter 3.643105652144331 ns/iter 1.03
Pointer_Object_Traverse 23.96198322924681 ns/iter 23.72934117302901 ns/iter 1.01
Pointer_Object_Try_Traverse 27.886794591195038 ns/iter 27.004967135454613 ns/iter 1.03
Pointer_Push_Back_Pointer_To_Weak_Pointer 191.95081170512879 ns/iter 165.83173223803777 ns/iter 1.16
Pointer_Walker_Schema_ISO_Language 3019518.8620688175 ns/iter 3049655.942982797 ns/iter 0.99
Pointer_Maybe_Tracked_Deeply_Nested/0 1408757.9939880238 ns/iter 1190019.4088586501 ns/iter 1.18
Pointer_Maybe_Tracked_Deeply_Nested/1 1919407.369863097 ns/iter 2013891.1101451847 ns/iter 0.95
Pointer_Position_Tracker_Get_Deeply_Nested 592.0692559214531 ns/iter 781.2040412604659 ns/iter 0.76
Schema_Frame_WoT_References 5214094.525925888 ns/iter 4631765.960000393 ns/iter 1.13
Schema_Frame_OMC_References 21431147.12121339 ns/iter 20562182.45714133 ns/iter 1.04
Schema_Frame_OMC_Locations 19714357.942854933 ns/iter 18402954.78947502 ns/iter 1.07
Schema_Frame_ISO_Language_Locations 101393804.33332689 ns/iter 99101197.4285649 ns/iter 1.02
Schema_Frame_KrakenD_References 39567044.38888892 ns/iter 38714605.833332725 ns/iter 1.02
Schema_Frame_KrakenD_Reachable 577144642.9999969 ns/iter 792855770.9999496 ns/iter 0.73
Schema_Iterator_ISO_Language 3023906.8068666137 ns/iter 2749673.596774242 ns/iter 1.10
Schema_Frame_ISO_Language_Locations_To_JSON 110164385.40000308 ns/iter 113336963.20000398 ns/iter 0.97
Schema_Tracker_ISO_Language 4673603.125827668 ns/iter 4376605.024845049 ns/iter 1.07
Schema_Tracker_ISO_Language_To_JSON 19654966.666668847 ns/iter 19805619.91428463 ns/iter 0.99
Schema_Format_ISO_Language_To_JSON 107780085.49999641 ns/iter 100034786.9999944 ns/iter 1.08
Schema_Bundle_Meta_2020_12 1699279.2106510475 ns/iter 1551875.984584877 ns/iter 1.09
Schema_Frame_Many_Resources_References 376889422.0000334 ns/iter 368699383.4999726 ns/iter 1.02
EditorSchema_ForEditor_EmbeddedResources 14005266.240005767 ns/iter 12394307.85964439 ns/iter 1.13
URITemplateRouter_Create 31606.541691143968 ns/iter 28540.490003619852 ns/iter 1.11
URITemplateRouter_Match 177.09037917129763 ns/iter 143.89484512437795 ns/iter 1.23
URITemplateRouter_Match_BasePath 203.578766454696 ns/iter 158.33704911544464 ns/iter 1.29
URITemplateRouterView_Restore 7635.176397233274 ns/iter 3429.174689209019 ns/iter 2.23
URITemplateRouterView_Match 143.5119001918486 ns/iter 143.5345572338808 ns/iter 1.00
URITemplateRouterView_Match_BasePath 163.284300391501 ns/iter 161.3285270890896 ns/iter 1.01
URITemplateRouterView_Arguments 428.64981110479994 ns/iter 424.4439618146088 ns/iter 1.01
JSONL_Parse_Large 10785495.723077403 ns/iter 10110918.884058028 ns/iter 1.07
JSONL_Parse_Large_GZIP 11921859.983051606 ns/iter 11021751.666665599 ns/iter 1.08
HTML_Build_Table_100000 74051197.63636363 ns/iter 66010713.454550736 ns/iter 1.12
HTML_Render_Table_100000 5310178.853846117 ns/iter 2734268.7617188944 ns/iter 1.94

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

@jviotti jviotti merged commit ecaa0df into main May 13, 2026
13 checks passed
@jviotti jviotti deleted the non-atomic-write branch May 13, 2026 13:22
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 (windows/msvc)

Details
Benchmark suite Current: b1b86f6 Previous: 4707860 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 7.503208705357572 ns/iter 7.545964285713731 ns/iter 0.99
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 7.557595982142626 ns/iter 7.522830357142852 ns/iter 1.00
Regex_Period_Asterisk 7.5190758928584955 ns/iter 7.5169441964284545 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 7.5139732142862465 ns/iter 7.56869910714337 ns/iter 0.99
Regex_Period_Plus 9.884800402301142 ns/iter 9.684830313907982 ns/iter 1.02
Regex_Period 9.695268706719274 ns/iter 9.703088795967538 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 9.683373437500364 ns/iter 9.779883438482852 ns/iter 0.99
Regex_Caret_Group_Period_Plus_Group_Dollar 9.678582546076996 ns/iter 9.699541028125598 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 7.503367187499269 ns/iter 7.60534040178332 ns/iter 0.99
Regex_Caret_Group_Period_Asterisk_Group_Dollar 7.5080033482142845 ns/iter 7.511529017854965 ns/iter 1.00
Regex_Caret_X_Hyphen 11.76735000000154 ns/iter 11.776357142857867 ns/iter 1.00
Regex_Period_Md_Dollar 37.55625558034786 ns/iter 40.77687420683699 ns/iter 0.92
Regex_Caret_Slash_Period_Asterisk 11.271092187499221 ns/iter 11.260095485444692 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 9.68770040317988 ns/iter 9.677507099652743 ns/iter 1.00
Regex_Nested_Backtrack 48.31295994433105 ns/iter 52.30184821428452 ns/iter 0.92
JSON_Array_Of_Objects_Unique 468.14782771161236 ns/iter 456.4100572344673 ns/iter 1.03
JSON_Parse_1 7915.348214285903 ns/iter 7856.271205357908 ns/iter 1.01
JSON_Parse_Real 16036.712053570616 ns/iter 15526.506696430835 ns/iter 1.03
JSON_Parse_Decimal 16632.758928573872 ns/iter 15627.008928572448 ns/iter 1.06
JSON_Parse_Schema_ISO_Language 5858416.0000009425 ns/iter 5832097.999998496 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 61.183526785717795 ns/iter 57.35409999999775 ns/iter 1.07
JSON_Equality_Helm_Chart_Lock 266.1989136695777 ns/iter 306.88040878924545 ns/iter 0.87
JSON_Divisible_By_Decimal 259.1799374999937 ns/iter 258.6648396725824 ns/iter 1.00
JSON_String_Equal/10 12.61073593749984 ns/iter 12.546408928573426 ns/iter 1.01
JSON_String_Equal/100 12.935687499996057 ns/iter 14.0145821428551 ns/iter 0.92
JSON_String_Equal_Small_By_Perfect_Hash/10 2.1997665624994056 ns/iter 2.2105231250002078 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 12.554810714285784 ns/iter 12.523823214284644 ns/iter 1.00
JSON_String_Fast_Hash/10 3.1372450892856056 ns/iter 3.132158482142496 ns/iter 1.00
JSON_String_Fast_Hash/100 3.145329910713558 ns/iter 3.138050892857791 ns/iter 1.00
JSON_String_Key_Hash/10 3.79006124323144 ns/iter 3.763056957565588 ns/iter 1.01
JSON_String_Key_Hash/100 16.879792074465712 ns/iter 16.88125301195364 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 5.091949000000113 ns/iter 5.20939799999951 ns/iter 0.98
JSON_Object_Defines_Miss_Too_Small 3.7783264218245223 ns/iter 3.766261600417078 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.7710546361222144 ns/iter 3.767044278987995 ns/iter 1.00
Pointer_Object_Traverse 47.111806855173995 ns/iter 46.70211096695544 ns/iter 1.01
Pointer_Object_Try_Traverse 49.571830000013506 ns/iter 49.463730000002215 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 168.2536295705456 ns/iter 169.34670553664822 ns/iter 0.99
Pointer_Walker_Schema_ISO_Language 10775017.187498292 ns/iter 10973990.625000596 ns/iter 0.98
Pointer_Maybe_Tracked_Deeply_Nested/0 1995406.0606067108 ns/iter 1950533.7792639409 ns/iter 1.02
Pointer_Maybe_Tracked_Deeply_Nested/1 3077274.5535715884 ns/iter 3114536.6071427814 ns/iter 0.99
Pointer_Position_Tracker_Get_Deeply_Nested 581.1229921488691 ns/iter 616.3553571426457 ns/iter 0.94
Schema_Frame_WoT_References 9837474.666668033 ns/iter 9861470.312500842 ns/iter 1.00
Schema_Frame_OMC_References 41774056.24999153 ns/iter 42408782.3529429 ns/iter 0.99
Schema_Frame_OMC_Locations 38505638.88888953 ns/iter 38934561.1111038 ns/iter 0.99
Schema_Frame_ISO_Language_Locations 177640125.000039 ns/iter 180286350.00001714 ns/iter 0.99
Schema_Frame_KrakenD_References 84879677.77778572 ns/iter 92777342.85715918 ns/iter 0.91
Schema_Frame_KrakenD_Reachable 479927750.00000167 ns/iter 550131599.999986 ns/iter 0.87
Schema_Iterator_ISO_Language 6244238.392856768 ns/iter 6657563.392855488 ns/iter 0.94
Schema_Frame_ISO_Language_Locations_To_JSON 279847300.00002855 ns/iter 300542850.0000562 ns/iter 0.93
Schema_Tracker_ISO_Language 9411245.333333986 ns/iter 9664760.93750046 ns/iter 0.97
Schema_Tracker_ISO_Language_To_JSON 46694846.66666601 ns/iter 48957942.857133016 ns/iter 0.95
Schema_Format_ISO_Language_To_JSON 179870149.99994245 ns/iter 198837475.00006166 ns/iter 0.90
Schema_Bundle_Meta_2020_12 2843695.5823303927 ns/iter 3087543.220332872 ns/iter 0.92
Schema_Frame_Many_Resources_References 1477626999.999984 ns/iter 1554927300.000145 ns/iter 0.95
EditorSchema_ForEditor_EmbeddedResources 27859764.00002255 ns/iter 28867309.09091801 ns/iter 0.97
URITemplateRouter_Create 38176.59040177596 ns/iter 41632.18037258085 ns/iter 0.92
URITemplateRouter_Match 210.74223612754034 ns/iter 218.93565636877912 ns/iter 0.96
URITemplateRouter_Match_BasePath 244.25767857142742 ns/iter 243.56685714289077 ns/iter 1.00
URITemplateRouterView_Restore 30609.788371002393 ns/iter 31598.46247597517 ns/iter 0.97
URITemplateRouterView_Match 164.706055672292 ns/iter 163.98896857068345 ns/iter 1.00
URITemplateRouterView_Match_BasePath 189.44187405732848 ns/iter 189.96893660433287 ns/iter 1.00
URITemplateRouterView_Arguments 441.4592499999514 ns/iter 441.8003749999855 ns/iter 1.00
JSONL_Parse_Large 28018987.99999435 ns/iter 27754015.999998957 ns/iter 1.01
JSONL_Parse_Large_GZIP 28340763.99999503 ns/iter 27595683.999998074 ns/iter 1.03
HTML_Build_Table_100000 84980228.57140443 ns/iter 85115722.22222538 ns/iter 1.00
HTML_Render_Table_100000 7686024.107142332 ns/iter 6999115.55555496 ns/iter 1.10

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: b1b86f6 Previous: 4707860 Ratio
HTML_Build_Table_100000 72845572.00000563 ns/iter 64732498.72727716 ns/iter 1.13
HTML_Render_Table_100000 5293416.038168414 ns/iter 5668841.176923077 ns/iter 0.93
JSONL_Parse_Large 12470595.553574119 ns/iter 13218573.339621421 ns/iter 0.94
JSONL_Parse_Large_GZIP 13756370.36000171 ns/iter 14348742.142856838 ns/iter 0.96
URITemplateRouter_Create 30696.566324742576 ns/iter 30382.83798302385 ns/iter 1.01
URITemplateRouter_Match 170.94828081230534 ns/iter 179.80326861934515 ns/iter 0.95
URITemplateRouter_Match_BasePath 200.29940760385608 ns/iter 211.53904330423617 ns/iter 0.95
URITemplateRouterView_Restore 8610.880943805378 ns/iter 7806.586104764301 ns/iter 1.10
URITemplateRouterView_Match 129.97261704489117 ns/iter 138.54340763108044 ns/iter 0.94
URITemplateRouterView_Match_BasePath 148.6391165232877 ns/iter 156.74334533149923 ns/iter 0.95
URITemplateRouterView_Arguments 468.96147957368515 ns/iter 483.844397424943 ns/iter 0.97
EditorSchema_ForEditor_EmbeddedResources 14135904.220015619 ns/iter 14060832.039995149 ns/iter 1.01
Schema_Frame_WoT_References 5500994.734374487 ns/iter 5432082.705426161 ns/iter 1.01
Schema_Frame_OMC_References 22795032.83870649 ns/iter 22399195.63332933 ns/iter 1.02
Schema_Frame_OMC_Locations 21513483.212119713 ns/iter 20724556.970589325 ns/iter 1.04
Schema_Frame_ISO_Language_Locations 103895049.83334064 ns/iter 104206424.00000209 ns/iter 1.00
Schema_Frame_KrakenD_References 44347673.12500299 ns/iter 38849131.41176666 ns/iter 1.14
Schema_Frame_KrakenD_Reachable 575813411.0001265 ns/iter 517355884.0001533 ns/iter 1.11
Schema_Iterator_ISO_Language 3236547.460465074 ns/iter 3440512.65116282 ns/iter 0.94
Schema_Frame_ISO_Language_Locations_To_JSON 231517918.66666827 ns/iter 219025086.66668534 ns/iter 1.06
Schema_Tracker_ISO_Language 4469683.210191952 ns/iter 4700848.99999873 ns/iter 0.95
Schema_Tracker_ISO_Language_To_JSON 22181047.4516118 ns/iter 22358317.967744723 ns/iter 0.99
Schema_Format_ISO_Language_To_JSON 120855797.20005627 ns/iter 112779084.49998601 ns/iter 1.07
Schema_Bundle_Meta_2020_12 1760638.8618139762 ns/iter 1810454.8837192652 ns/iter 0.97
Schema_Frame_Many_Resources_References 389869413.5000369 ns/iter 376227059.4999109 ns/iter 1.04
Pointer_Object_Traverse 26.857192352192836 ns/iter 29.062775076663378 ns/iter 0.92
Pointer_Object_Try_Traverse 22.096687306464695 ns/iter 19.885706508608898 ns/iter 1.11
Pointer_Push_Back_Pointer_To_Weak_Pointer 158.12186450585597 ns/iter 135.9357946929921 ns/iter 1.16
Pointer_Walker_Schema_ISO_Language 3526553.0597013794 ns/iter 3324567.5592418322 ns/iter 1.06
Pointer_Maybe_Tracked_Deeply_Nested/0 1554142.790178657 ns/iter 1541272.3414095482 ns/iter 1.01
Pointer_Maybe_Tracked_Deeply_Nested/1 1728325.8168316311 ns/iter 1762742.6818182697 ns/iter 0.98
Pointer_Position_Tracker_Get_Deeply_Nested 438.60035972374783 ns/iter 432.71912072644176 ns/iter 1.01
JSON_Array_Of_Objects_Unique 407.006798522439 ns/iter 405.5588624257374 ns/iter 1.00
JSON_Parse_1 7638.832212496693 ns/iter 7939.180614444168 ns/iter 0.96
JSON_Parse_Real 11804.577080583662 ns/iter 13211.062060757353 ns/iter 0.89
JSON_Parse_Decimal 16259.637478475019 ns/iter 18211.418130324186 ns/iter 0.89
JSON_Parse_Schema_ISO_Language 4652076.675495886 ns/iter 4737458.98657612 ns/iter 0.98
JSON_Fast_Hash_Helm_Chart_Lock 70.36137080001481 ns/iter 71.72613014007466 ns/iter 0.98
JSON_Equality_Helm_Chart_Lock 183.34005552169432 ns/iter 180.35488919829126 ns/iter 1.02
JSON_Divisible_By_Decimal 231.13967565885187 ns/iter 236.1554156763521 ns/iter 0.98
JSON_String_Equal/10 6.4877929325647905 ns/iter 6.511710420322301 ns/iter 1.00
JSON_String_Equal/100 7.008925785603349 ns/iter 7.033919573239065 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.716536589332119 ns/iter 0.6252120780099217 ns/iter 1.15
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 21.93437004693731 ns/iter 25.204320247006006 ns/iter 0.87
JSON_String_Fast_Hash/10 1.7601445704763 ns/iter 1.5590602677127765 ns/iter 1.13
JSON_String_Fast_Hash/100 1.769816937804851 ns/iter 1.558959949645192 ns/iter 1.14
JSON_String_Key_Hash/10 1.0862246144653052 ns/iter 1.2471458125890724 ns/iter 0.87
JSON_String_Key_Hash/100 14.901301049731284 ns/iter 12.446827916838007 ns/iter 1.20
JSON_Object_Defines_Miss_Same_Length 3.8705212108261033 ns/iter 3.426697733168207 ns/iter 1.13
JSON_Object_Defines_Miss_Too_Small 4.221999049666026 ns/iter 3.737224969040811 ns/iter 1.13
JSON_Object_Defines_Miss_Too_Large 3.5227540281968923 ns/iter 3.1174778504486103 ns/iter 1.13
Regex_Lower_S_Or_Upper_S_Asterisk 0.7057928314879139 ns/iter 0.6227494855956505 ns/iter 1.13
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.7037258254698536 ns/iter 0.6233523140635784 ns/iter 1.13
Regex_Period_Asterisk 1.0556623591315444 ns/iter 0.937663505429503 ns/iter 1.13
Regex_Group_Period_Asterisk_Group 1.0551451639624054 ns/iter 0.9347869836468274 ns/iter 1.13
Regex_Period_Plus 0.7044564789516824 ns/iter 0.6228618799081268 ns/iter 1.13
Regex_Period 0.7042512197643631 ns/iter 0.6240003610876835 ns/iter 1.13
Regex_Caret_Period_Plus_Dollar 1.0562834240805679 ns/iter 0.935104818168294 ns/iter 1.13
Regex_Caret_Group_Period_Plus_Group_Dollar 1.0557180618594832 ns/iter 0.9350581140880341 ns/iter 1.13
Regex_Caret_Period_Asterisk_Dollar 0.7059309816534372 ns/iter 0.6239320201397918 ns/iter 1.13
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.7036499528053951 ns/iter 0.6231641928572444 ns/iter 1.13
Regex_Caret_X_Hyphen 3.868261218312183 ns/iter 4.049771733295087 ns/iter 0.96
Regex_Period_Md_Dollar 33.823455650151494 ns/iter 30.438642049977418 ns/iter 1.11
Regex_Caret_Slash_Period_Asterisk 4.573680999642914 ns/iter 4.671589017232122 ns/iter 0.98
Regex_Caret_Period_Range_Dollar 0.8403695942525916 ns/iter 0.780496640748342 ns/iter 1.08
Regex_Nested_Backtrack 39.837692762621465 ns/iter 37.73752276575122 ns/iter 1.06

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

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