In the code below, the mutating function call is faster by almost 2x than the non-mutating version. To see this, just call both functions about 25 million times. If you'd like an Xcode project which packages all this up as library and executable which runs the timing, please do " git clone firstname.lastname@example.org:davidbaraff/ptrTest2.git".
The structure CxxData is a struct defined in C (i.e. in a bridging header file), as follows:
while the function "analyze()" is written in C, and returns a constant value: