# stage2 parser: token ids in their own array · gitcafe/zig

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

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

Visibility: public

Requested revision: 8df0841d6ab964e2aec750a8ceeda51912ae448b

Requested commit: 8df0841d6ab964e2aec750a8ceeda51912ae448b

Commit: 8df0841d6ab964e2aec750a8ceeda51912ae448b

Tree: fa2a7f30a4eaa8f94f6d5c251ff109cd4bb0427c

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2 parser: token ids in their own array

To prevent cache misses, token ids go in their own array, and the
start/end offsets go in a different one.

perf measurement before:
         2,667,914      cache-misses:u
     2,139,139,935      instructions:u
       894,167,331      cycles:u

perf measurement after:
         1,757,723      cache-misses:u
     2,069,932,298      instructions:u
       858,105,570      cycles:u

```

## Parents

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

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