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

Give another go at ZString #226

Open
Marvin-Brouwer opened this issue Nov 18, 2022 · 1 comment
Open

Give another go at ZString #226

Marvin-Brouwer opened this issue Nov 18, 2022 · 1 comment
Labels
enhancement New feature or request Hacktoberfest help wanted Extra attention is needed
Milestone

Comments

@Marvin-Brouwer
Copy link
Owner

Marvin-Brouwer commented Nov 18, 2022

Is your feature request related to a problem? Please describe.
Performance improvements are always nice.
Apparently ZString is fast and allocates similar to cashed StringBuilder:
https://twitter.com/KStrubeG/status/1593529443024109570

Describe the solution you'd like
Give a go at ZString and see how it affects the benchmarks.

Describe alternatives you've considered
-

Additional context
We have an interface ITextWriter.cs you should just be able to create an implementation for that.
However, you may need to completely remove the StringBuilderPool from the equation.

We've tried this at the start of this project and couldn't get this to work.
Because of that, we tried to copy code from an old library and combine it with ZString code and it didn't end being faster or more memory efficient.
However, that may as well have been our fault.

@Marvin-Brouwer Marvin-Brouwer added enhancement New feature or request help wanted Extra attention is needed Hacktoberfest labels Nov 18, 2022
@Marvin-Brouwer Marvin-Brouwer added this to the Help wanted milestone Nov 18, 2022
@Marvin-Brouwer
Copy link
Owner Author

If it does end up being more performant, perhaps it's a good idea to create a factory so we can use ZString for UTF-8 and UTF-16 and then for everything else fall back to the existing implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant