Programming optimizations
Does any body know what generates the fastest code in visual C++ 6.0 When you are optimizing a game so you use a vector classes or vector structs or can you program C++ classes to get the same speed as structs with inline functions.
Any help on this topic would be great!
i personally prefer vector classes implemented with C++.
i´ve noticed no performance drawbacks. try to avoid virtual methods that are called thousands or hundred thousands of times each frame.
and you should also avoid overloaded operators that return class structs.
use "call by reference" paramters whenever possible
i´ve noticed no performance drawbacks. try to avoid virtual methods that are called thousands or hundred thousands of times each frame.
and you should also avoid overloaded operators that return class structs.
use "call by reference" paramters whenever possible
When I look at the Quake2 source code I notice ID uses structs not classes - Is this a hint to what to use?
If you are targeting windows, save yourself a bunch of time and use the D3DX math lib that comes with DirectX 8.1. You can link in the math library without the rest of DX, and it has lots of matrix, vector and quaternion functions and associated overloaded operators. All the functions are also SIMD accelerated for both Intel and AMD processors.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement