> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uniwind.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Precompiled Headers

> Speed up native compilation with precompiled headers on Android and iOS

## Overview

Precompiled headers (PCH) let the compiler process Uniwind's heavy C++ headers once and reuse the result across every translation unit, instead of recompiling them for each file. This cuts native build time with no changes to your code or styles.

<Info>
  Precompiled headers are available in Uniwind Pro starting from version `1.5.0` and are enabled by default on both Android and iOS.
</Info>

## Performance

PCH gives a solid, real win on both platforms:

| Platform | Compilation speedup |
| -------- | ------------------- |
| Android  | \~26 - 29%          |
| iOS      | \~13 - 20%          |

## Disabling

PCH is on by default, so there is nothing to configure to benefit from it. If you need to turn it off, use the option for your platform.

### iOS

Set `UNIWIND_ENABLE_PCH=0` when installing pods:

```bash theme={null}
UNIWIND_ENABLE_PCH=0 pod install
```

### Android

The reliable way is to pass the CMake flag from your app's `android/app/build.gradle` (or the library's) under `externalNativeBuild`:

```groovy android/app/build.gradle theme={null}
externalNativeBuild {
  cmake {
    arguments "-DUNIWIND_ENABLE_PCH=OFF"
  }
}
```
