C
C#2mo ago
akeit0

using ArrayPool<T> across await / yield

I was optimizing Linq's TakeLast, but I have a different opinion from the reviewer regarding ArrayPool and yield. I would like official guidelines (at least for implementations within the BCL). I'd like to hear other people's opinions. https://github.com/dotnet/runtime/discussions/48257#discussioncomment-14756300
GitHub
ArrayPool<T>/MemoryPool<T> Best Practice · dotnet runtime · Discu...
When should they be used? Are there any guidelines? And the docs said: Using the ArrayPool class to rent and return buffers (using the Rent and Return methods) can improve performance in situations...
1 Reply
333fred
333fred2mo ago
@akeit0 I don't know what you're looking for here. Eirik is a member of the libraries team, and is a definitive source for BCL guidelines Posting in the help channel on a community discord isn't going to give you differing opinions on what the official BCL guidelines are Also, before you get into the nitty-gritty of worrying about details like this, you should really do those native aot investigations you were asked for, as they could scrap the approach

Did you find this page helpful?