2 ms·
Instead of memset() you've got ZeroMemory(), instead of memcpy() you've got CopyMemory(). I believe MSVC intrinsics will use the rep stos/movs instructions, wh
by userbinator 1y ago
Instead of memset() you've got ZeroMemory(), instead of memcpy() you've got CopyMemory().
I believe MSVC intrinsics will use the rep stos/movs instructions, which are even smaller than calling functions (which includes the size of their import table entries too.)
- kevin_thibedeau 1y agoThe standard allows memset/memcpy to be replaced by inline code. There is no need to use non-standard extensions to get a performance boost.
- userbinator 1y agoThat's how the MSVC intrinsics work. Turn on the option and memset/memcpy, among others, gets replaced automatically: https://learn.microsoft.com/en-us/cpp/preprocessor/intrinsic?view=msvc-170 https://learn.microsoft.com/en-us/cpp/preprocessor/intrinsic...