Skip to content

Commit be6b87e

Browse files
author
Swaroop Sridhar
committed
Update MemSet/MemCopy helpers on Windows to a faster implementation.
This PR provides an optimized version of JIT_MemSet/JIT_MemCpy assembly helper functions on 64-bit Windows. JIT_MemSet gets invoked when bytecode Initblk is executed while JIT_MemCpy gets invoked when bytecode Cpblk is executed. JIT_MemCpy takes care of both overlap and non-overlap scenarios. The use of this optimized JIT_MemCpy is extended to Buffer::BlockCopy and Buffer::InternalBlockCopy by replacing the CRT memmove. The unit test BlockCopyPerf.cs is used as reference and modified so that the copy length varies from 0 byte to 520 bytes. This micro benchmark tests Buffer::BlockCopy (JIT_MemCpy). The following chart and table show the result on Intel(R) Core(TM) i7-5960X CPU @ 3.00GHz with 32GB RAM. OS is Windows 10 Enterprise. Further details about performance improvements are available at dotnet#7198 Fixes #7146.
1 parent b39f1bb commit be6b87e

File tree

2 files changed

+276
-466
lines changed

2 files changed

+276
-466
lines changed

0 commit comments

Comments
 (0)