Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce ZString ValueStringBuilder #193

Merged
merged 196 commits into from
Aug 29, 2021

Conversation

axunonb
Copy link
Member

@axunonb axunonb commented Aug 29, 2021

Significant improvements of performance:

BenchmarkDotNet performance tests for formatters and ISources now show (depending on different input format strings) the following improvements compared to v2.7.0:

  • increase in speed by up to 40%
  • decrease of GC pressure (collects are only GC Generation 0, allocated memory reduced by up to 60%)

(Formatting measured with a cached parsed Format, and including the result string returned to the caller. Parser was already optimized with PR #187.)

Changes in detail:

  • Added Cysharp/ZString as a git subtree to SmartFormat
  • Added project SmartFormat.ZString
  • Replaced all StringBuilder implementations with Utf16ValueStringBuilder, and all StringOutput implementations with ZStringOutput
  • Included SmartFormat.ZString into the nuget package

axunonb and others added 26 commits May 9, 2021 23:04
@codecov
Copy link

codecov bot commented Aug 29, 2021

Codecov Report

Merging #193 (183c326) into version/v3.0 (0d6f514) will decrease coverage by 78%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##           version/v3.0    #193      +/-   ##
===============================================
- Coverage            95%     16%     -78%     
===============================================
  Files                50      95      +45     
  Lines              2049   12769   +10720     
===============================================
+ Hits               1939    2082     +143     
- Misses              110   10687   +10577     
Impacted Files Coverage Δ
...c/SmartFormat.ZString/repo/src/ZString/EnumUtil.cs 0% <ø> (ø)
...rtFormat.ZString/repo/src/ZString/ExceptionUtil.cs 0% <ø> (ø)
...ormat.ZString/repo/src/ZString/FastNumberWriter.cs 0% <ø> (ø)
...artFormat.ZString/repo/src/ZString/FormatHelper.cs 0% <ø> (ø)
...artFormat.ZString/repo/src/ZString/FormatParser.cs 0% <ø> (ø)
...rc/ZString/NestedStringBuilderCreationException.cs 0% <ø> (ø)
...t.ZString/repo/src/ZString/Number/BitOperations.cs 0% <ø> (ø)
...Format.ZString/repo/src/ZString/Number/BufferEx.cs 0% <ø> (ø)
...ormat.ZString/repo/src/ZString/Number/DecimalEx.cs 0% <ø> (ø)
...tFormat.ZString/repo/src/ZString/Number/FloatEx.cs 0% <ø> (ø)
... and 97 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d6f514...183c326. Read the comment docs.

@axunonb axunonb merged commit 6199f91 into axuno:version/v3.0 Aug 29, 2021
@axunonb axunonb deleted the introduce-zstring-builder branch August 29, 2021 23:25
axunonb added a commit to axunonb/SmartFormat that referenced this pull request Mar 10, 2022
* Added [Cysharp/ZString](https://github.com/Cysharp/ZString) as a git subtree to SmartFormat
* Added project `SmartFormat.ZString`
* Replaced all `StringBuilder` implementations with `Utf16ValueStringBuilder`, and all `StringOutput` implementations with `ZStringOutput`
* Included `SmartFormat.ZString` into the nuget package
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.

None yet