Original Post
This topic popped up in my other thread so I thought I'd make a new thread discussing it since speed was questioned. According to my benchmarks, my operator overloading vector class is a lot slower than my straight C vector functions (this time I conducted the test in release mode). It's possible that my operator overloading isn't set up right, so could you look at it for me? Named txt so it will open in your broweser. Header file: http://www.spider3d.com/shared/s3d_vector.txt The classes are at the top, the straight C functions follow after the class, S3Dvec3f is just a typedef (#typedef float S3Dvec3f[3]). Example: //======== //Straight C using functions //======== S3Dvec3f CV1, CV2; S3Dfloat DOT; //...set up vectors DOT = s3dVecDot3f(CV1, CV2); //======== //Operator Overloading using classes //======== s3d_vec OOV1, OOV2; //...set up vectors DOT = OOV1 * OOV2;