In this article

Floating Point Operations in Xamarin.iOS

In this article

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.

Feedback

We'd love to hear your thoughts. Choose the type you'd like to provide: