Skip to content

Commit

Permalink
Documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
linkdotnet committed Apr 5, 2022
1 parent 9c383f2 commit 30b15d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/site/articles/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
Before I answer the question, I would like to raise another question: How does it work differently and more effective than the current `StringBuilder`?

The basic idea is to use a `ref struct` which enforces that the `ValueStringBuilder` will life on the **stack** instead of the **heap**.
Furthermore we try to use advanced features like `Span<T>` and `ArrayPool` to reduce allocations even further. This will lead to some limitations.
Furthermore we try to use advanced features like `Span<T>` and `ArrayPool` to reduce allocations even further. Because of the way C# / .NET is optimized for those types the `ValueStringBuilder` gains a lot of speed with low allocations.

With this approach some limitations arise. Head over to the [known limitation](xref:known_limitations) to know more.

## Resources:
[Here](https://steven-giesel.com/blogPost/4cada9a7-c462-4133-ad7f-e8b671987896) is my detailed blog post about some of the implementation details.
3 changes: 3 additions & 0 deletions docs/site/articles/known_limitations.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
uid: known_limitations
---
# Known Limitations
The base of the `ValueStringBuilder` is a `ref struct`. With that there are certain limitations, which might make it not a good fit for your needs.
* `ref struct`s can only live on the **stack** and therefore can not be a field for a **class** or a non **ref struct**.
Expand Down

0 comments on commit 30b15d3

Please sign in to comment.