# `Localize.Collation.FastLatin`
[🔗](https://github.com/elixir-localize/localize/blob/v0.39.0/lib/localize/collation/fast_latin.ex#L1)

Fast lookup table for Basic Latin and Latin Extended-A codepoints.

Provides O(1) collation element lookup for codepoints U+0000..U+017F
by pre-computing a tuple indexed by codepoint value. This bypasses
the full contraction-checking path in `Localize.Collation.Table` for the
most commonly encountered characters.

Codepoints that are contraction starters (e.g., `L` and `l` for Catalan
l·l) or combining marks (CCC > 0) are excluded from the fast table and
fall back to the normal lookup path.

# `build`

```elixir
@spec build() :: :ok
```

Build the fast Latin lookup table from the loaded collation table.

Reads the collation table and contraction starters from `:persistent_term`,
and constructs a tuple of `@latin_limit` entries. Each entry is either a
list of collation element tuples (for direct lookup) or `nil` (indicating
the codepoint must use the full lookup path).

Called automatically during table loading.

### Returns

* `:ok`.

# `lookup`

```elixir
@spec lookup(non_neg_integer()) :: [Localize.Collation.Element.t()] | nil
```

Look up collation elements for a Latin codepoint.

### Arguments

* `cp` - an integer codepoint less than `0x0180`.

### Returns

* A list of collation element tuples - the codepoint has a direct mapping.

* `nil` - the codepoint is a contraction starter, combining mark, or unmapped;
  use the full lookup path.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
