Forums > Dev

Optimization settings for UB in XCode

Jun 27 2006 | 5:01 pm

Just playing around with these settings when compiling msp externals and thought the results might be interesting to others.

The UB SDK sets the optimisation level to Os (Fastest / Smallest) for deployment (rather than O3 – fastest – which apple say may produce larger binaries).

I discovered the following:

1 – The O3 Faster setting may produce code that runs quite a lot faster. As an example I compiled the plus~ project in the SDK with this setting and also with the Os (Fastest/Smallest) setting. I then tested a patch filled only with plus~ objects (both inlets connected to a signal)

Under Os – CPU was at 56-58%

Under O3 – CPU was at 39-42%

Which I think is a pretty decent saving. In both cases the external came out as being 36K.

I also had the same result with the code for times~ from an older SDK (also

2 – On the other hand…

A couple of more complex msp externals were marginally slower with this setting (and a bit bigger as well)

These observations hold true for intel only (Compiled and tested on a MBP only).

So it looks like it might be trying different settings for each individual case.


Viewing 1 post (of 1 total)

Forums > Dev