I want to make a sin func. so here's my code:
inline double _cdecl Sin(double Rad)
{
_asm
{
fld QWORD PTR [Rad]
fsin
}
}
my func works faster(ratio of about 6) than the standard sin. (there are probably some problems in it, but it's enough for me) but if I'll do for example
for(int i = 0; i < 1000000; ++i)
sin(1)
the standard sin will be faster in a ratio of about 3 and if I'll do
for(int i = 0; i < 1000000; ++i)
sin(i)
my func will be faster in ratio of about 3. what happens here?