Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

memset Vs ippiCopy

micromysore1
Beginner
861 Views
If i want to set the memory to ZERO ..
which one is recommended & why ?? which one is faster & why ??
any insight will help !!

Ipp32f *pSrc;
IppiSize sz = {8,8};
pSrc = ippsMalloc(64);

ippiCopy_32f_C1R(0, pSrc, 4*8, sz);
or
memset(pSrc, 0, 64);

-madan
0 Kudos
1 Reply
Vladimir_Dudnik
Employee
861 Views
Hi,
of course it depends on data size. For small sizes it is better to use 1D functions, like ippsZero. For very small sizes memset will faster, just because modern compilers avoids function call in such case and use macro instead.
But for middle and big data sizes, you can use IPP to utilize MMX/SSE/HT features of Intel processors.
Regards,
Vladimir
0 Kudos
Reply