Floating Point

PDF for offline use

Let us know how you feel about this


0/250

Xamarin.iOS will by default perform 32-bit and 64-bit floating point operations using 64-bit precision on ARM.

While this higher precision is closer to what developers expect from floating point operations in C# on the desktop, on mobile, the performance impact can be significant.

It is possible to compile your 32-bit floating point code to use 32-bit floating point operations. To do this, you need to use at least Xamarin.iOS 8.10 and set in your iOS build options's panel on the "mtouch extra arguments" entry line the following value:

--aot-options=-O=float32

This will inform the static compilers (either Mono's built-in static compiler, or the LLVM-powered one) to perform floating point operations using 32-bit floats.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.