Declare nonmember functions as static whenever possible. This will speed up calls to the function.
Writing Optimized Code... Overview Variables Pointers Function Arguments Expressions Critical Loops Conversions Arithmetic Conversions Inlined Components