- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
I just have a quick testing with a function in VML library. You can see here:
In average, (t3-t2) = (t2-t1) x 3 (it means VML is slower). I use an array upto 2,000,000 elements.
It's just a very simple test, but I don't see MKL is more effective (faster) than the standard library. Or didn't I use it effectively? Is it possible to optimize VML/MKL to improve the speed of running?
I'd like to hear from you.
Regards,
I just have a quick testing with a function in VML library. You can see here:
float *fA =new float[VEC_LEN];
float *fB1=new float[VEC_LEN];
float *fB2=new float[VEC_LEN];
Randomize();
for(int i=0;ifA=(float)(Random(-998));
}
struct time t1;
gettime(&t1);
for(int i=0;ifB1=(float)sin(fA);
}
struct time t2;
gettime(&t2);
vsSin(VEC_LEN,fA,fB2);
struct time t3;
gettime(&t3);
In average, (t3-t2) = (t2-t1) x 3 (it means VML is slower). I use an array upto 2,000,000 elements.
It's just a very simple test, but I don't see MKL is more effective (faster) than the standard library. Or didn't I use it effectively? Is it possible to optimize VML/MKL to improve the speed of running?
I'd like to hear from you.
Regards,
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is this Random() ? One would expect an optimized sin() to be intended for arguments mostly between -Pi and Pi.
It would not be surprising to see the sinf() in the Intel svml library perform better than MKL SVML on a variety of real problems. I would have to guess you may be using a native x87 sin() on a machine which runs it better than average, as computing a double sin() and casting it to float would be slow in many cases. The native x87 sin() might be relatively efficient at range reduction on your machine.
It would not be surprising to see the sinf() in the Intel svml library perform better than MKL SVML on a variety of real problems. I would have to guess you may be using a native x87 sin() on a machine which runs it better than average, as computing a double sin() and casting it to float would be slow in many cases. The native x87 sin() might be relatively efficient at range reduction on your machine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh, it's the problem in using, not the library itself. The function Random(x) is to get a integer between 0 and x. When I set x a negative number, it returns a very big (random) number, sometimes negative. And as you said, I'm using an AMD Turion64, and maybe that made the bad result above.
Thanks for your comment.
Have a nice day!
Thanks for your comment.
Have a nice day!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page