Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

AvalonEdit and new Span feature of C# 7.2

$
0
0

Looks like the new Span<T> language feature of C# 7.2 could solve the performance issues of AvalonEdit due to memory allocation associated with manipulating immutable string type... please take a look.

"This library offers a unified (and allocation-free) representation of memory from a multitude of different sources, such as arrays, stack allocation and native code. With its slicing capabilities, it obviates the need for expensive copying and allocation in many scenarios, such as string manipulation, buffer management, etc, and provides a safe alternative to unsafe code. This is really a game changer, in my opinion. While you may start out using it mostly for performance-intensive scenarios, it is lightweight enough that I think many new idioms will evolve for using it in every day code."

C# 7.2: Understanding Span

 

 


Viewing all articles
Browse latest Browse all 1764

Trending Articles