You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dotnet version of the `StringBuilder` is a allpurpose version which normally fits a wide variety of needs.
33
-
But sometimes low allocation is key. Therefore I created the `ValueStringBuilder`. It is not a class but a `ref struct`which tries to do as less allocations as possible.
34
-
If you want to know how the `ValueStringBuilder` works and why it uses allocations and is even faster, checkout[this](https://steven-giesel.com/blogPost/4cada9a7-c462-4133-ad7f-e8b671987896) blog post.
35
-
The blog goes a bit more in detail how it works with a simplistic version of the `ValueStringBuilder`.
32
+
The dotnet version of the `StringBuilder` is an all-purpose version that normally fits a wide variety of needs.
33
+
But sometimes low allocation is key. Therefore I created the `ValueStringBuilder`. It is not a class but a `ref struct`that tries to do as less allocations as possible.
34
+
If you want to know how the `ValueStringBuilder` works and why it uses allocations and is even faster, check out[this](https://steven-giesel.com/blogPost/4cada9a7-c462-4133-ad7f-e8b671987896) blog post.
35
+
The blog goes into a bit more in detail about how it works with a simplistic version of the `ValueStringBuilder`.
36
36
37
37
## What it doesn't solve!
38
38
The library is not meant as a general replacement for the `StringBuilder` shipped with the .net framework itself. You can head over to the documentation and read about the ["Known limitations"](https://linkdotnet.github.io/StringBuilder/articles/known_limitations.html).
39
-
The library works best for a small to medium amount of strings (not multiple 100'000 characters, even though it can be still faster and uses less allocations). At anytime you can convert the `ValueStringBuilder` to a "normal" `StringBuilder` and vice versa.
39
+
The library works best for a small to medium amount of strings (not multiple 100'000 characters, even though it can be still faster and uses fewer allocations). At any time you can convert the `ValueStringBuilder` to a "normal" `StringBuilder` and vice versa.
40
40
41
-
The normal use case is to add concatenate strings in a hot-path where the goal is to put as minimal pressure on the GC as possible.
41
+
The normal use case is to add concatenate strings in a hotpath where the goal is to put as minimal pressure on the GC as possible.
42
42
43
43
## Documentation
44
-
A more detailed documentation can be found [here](https://linkdotnet.github.io/StringBuilder/). It is really important to understand how the `ValueStringBuilder` works so that you not run into weird situations where performance / allocations can even rise.
44
+
More detailed documentation can be found [here](https://linkdotnet.github.io/StringBuilder/). It is really important to understand how the `ValueStringBuilder` works so that you did not run into weird situations where performance/allocations can even rise.
45
45
46
46
## Benchmark
47
47
@@ -77,4 +77,4 @@ Another benchmark shows that this `ValueStringBuilder` uses less memory when it
77
77
78
78
```
79
79
80
-
Checkout the [Benchmark](tests/LinkDotNet.StringBuilder.Benchmarks) for more detailed comparison and setup.
80
+
Checkout the [Benchmark](tests/LinkDotNet.StringBuilder.Benchmarks) for a more detailed comparison and setup.
0 commit comments