---
title: MTLLibraryOptimizationLevel.size
framework: metal
role: symbol
role_heading: Case
path: metal/mtllibraryoptimizationlevel/size
---

# MTLLibraryOptimizationLevel.size

An optimization option for the Metal compiler that prioritizes minimizing the size of its output binaries, which may also reduce compile time.

## Declaration

```swift
case size
```

## Mentioned in

Minimizing the binary size of a shader library

## Discussion

Discussion This option is similar to MTLLibraryOptimizationLevel.default, but adds optimizations that prioritize minimizing a shader’s executable size, which may also reduce compile time.

## See Also

### Optimization options

- [MTLLibraryOptimizationLevel.default](metal/mtllibraryoptimizationlevel/default.md)
