摘要:
I did some tests with the C compiler of Visual Studio 2008, the two methods of dot below made no difference in the generated assembly code:typedefstructVec{floatx,y,z;}Vec;#defineDOT(a,b)(a.x*b.x+a.y*b.y+a.z*b.z)__forceinlinefloatdot(constVec*a,constVec*b){return(a->x*b->x+a->y*b->y+a-&g 阅读全文