Skip to content

Avoid copying data twice in MessagePackWriter.MemoryCopy when running…#1607

Merged
AArnott merged 2 commits intoMessagePack-CSharp:masterfrom
AlanLiu90:OptimizeMemoryCopyInUnity
Apr 19, 2023
Merged

Avoid copying data twice in MessagePackWriter.MemoryCopy when running…#1607
AArnott merged 2 commits intoMessagePack-CSharp:masterfrom
AlanLiu90:OptimizeMemoryCopyInUnity

Conversation

@AlanLiu90
Copy link
Contributor

@AlanLiu90 AlanLiu90 commented Apr 19, 2023

… in Unity

This PR uses UnsafeUtility.MemMove to implement MessagePackWriter.MemoryCopy in Unity. The API exists since Unity 2018.1, so all Unity versions supported by MessagePack have it.

@AArnott
Copy link
Collaborator

AArnott commented Apr 19, 2023

/azp run

@AlanLiu90
Copy link
Contributor Author

I saw there was a test failed, but it seems that it's unrelated to my PR. I tested on my local machine and all tests passed. I'm not sure about why it failed.

@AArnott AArnott added this to the v2.5 milestone Apr 19, 2023
@AArnott AArnott merged commit 620e41e into MessagePack-CSharp:master Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants