dotnet / dotnet/macios

Add Span APIs where appropriate

Open
#3,590 6 comments 2 reactions 0 assignees View on GitHub
enhancement iOS macOS request-for-comments
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 12h
Merged PRs (30d)
123

Description

With Mono 2017-12 integration done we can now extend public API to use more efficient Span (and possibly Memory) where useful.

I had a quick look at the existing APIs to see where it makes sense to have Span overloads and there are many but I would start with the most likely one under CoreFoundation first.

Few candidates to illustrate the scope

* CFData: public byte[] GetBuffer ()
* CFSocket.cs: public void SendData (byte[] data, double timeout)
* CFWriteStream.cs: public int Write (byte[] buffer)
* CFDataBuffer.cs: public unsafe CFDataBuffer (byte[] buffer)
* etc.

Things to look for where it might help
* Marshal copies
* fixed statement
* Temporary copies

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.