# LLVM: cache LLVM struct field indexes · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/c970dbdfeca60de227bba53b155c8374ae90f919)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: c970dbdfeca60de227bba53b155c8374ae90f919

Requested commit: c970dbdfeca60de227bba53b155c8374ae90f919

Commit: c970dbdfeca60de227bba53b155c8374ae90f919

Tree: 5e5a06f78fdb339d98af490b348759575d9c8b52

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
LLVM: cache LLVM struct field indexes

This is an optimization to avoid O(N) field index lookups. It's also
nicer in terms of DRY; the only tradeoff is memory usage.

```

## Parents

- [48e2ba3b3c1e224b59e3c97ed462ac88df4d8a4b](https://git.cafe/gitcafe/zig/commit/48e2ba3b3c1e224b59e3c97ed462ac88df4d8a4b?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/c970dbdfeca60de227bba53b155c8374ae90f919?format=markdown)
