Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

performance of VML

feiwu1979
Beginner
379 Views

Hi,

I am working on speeding up my program with VML. The following is my test:

start = clock();
for(int j = 0; j<1000; j++)
vsHypot(800, xx, yy, zz);
end = clock();
report time;

start = clock();
for(int j=0; j<1000; j++){
for (int i=0; i<800; ++i)
zz = (float)(hypot(xx, yy));
}
end = clock();
report time;

Basically, xx yy and zz are array of float with length of 800. I found that using vsHypot function is lower than using element-by-elementy calculation hypot by about 5-6 times. My program is running on AMD64 machine and I used "-Wl,--start-group -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -Wl,--end-group -lguide -lpthread -limf -lirc -lm" to compile. Did you see anything wrong with my test and why it is so low to use VML function?

Thanks,

Xiaoping

0 Kudos
1 Reply
Ilya_B_Intel
Employee
379 Views

Xiaoping,

Your timing system looks ok. Thank you for the catch. We will look forward to fix it.

Thanks,
Ilya

0 Kudos
Reply