Skip to content

Conversation

@TimothyMakkison
Copy link
Contributor

Add check for if modifiers are Doc.Null to avoid allocating a Concat and Doc[]

Benchmarks (timing is inaccurate)

Before

Method Mean Error StdDev Median Gen0 Gen1 Allocated
Default_CodeFormatter_Tests 131.9 ms 3.30 ms 8.86 ms 128.0 ms 3000.0000 1000.0000 34.57 MB
Default_CodeFormatter_Complex 261.3 ms 5.16 ms 4.03 ms 261.3 ms 5000.0000 2000.0000 53.03 MB

After

Method Mean Error StdDev Median Gen0 Gen1 Allocated
Default_CodeFormatter_Tests 189.5 ms 10.25 ms 28.05 ms 195.6 ms 3000.0000 1000.0000 34.31 MB
Default_CodeFormatter_Complex 264.2 ms 5.27 ms 13.97 ms 260.0 ms 5000.0000 2000.0000 52.31 MB

@TimothyMakkison TimothyMakkison force-pushed the argument_null branch 2 times, most recently from ba5bc97 to fc263f1 Compare October 25, 2025 09:49
Copy link
Owner

@belav belav left a comment

Choose a reason for hiding this comment

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

LGTM!

@belav belav enabled auto-merge (squash) December 25, 2025 16:22
@belav belav merged commit 5d45e5d into belav:main Dec 25, 2025
7 checks passed
@belav belav added this to the 1.3.0 milestone Dec 25, 2025
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.

2 participants