# stage2 parser: heuristics to pre-allocate token arrays · gitcafe/zig

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

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

Visibility: public

Requested revision: 69ff89fd1207bc95adf7a349319973c6070ce540

Requested commit: 69ff89fd1207bc95adf7a349319973c6070ce540

Commit: 69ff89fd1207bc95adf7a349319973c6070ce540

Tree: e918fe35d37fb0e35551e13b8d2b47aed5221b86

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2 parser: heuristics to pre-allocate token arrays

throughput: 72.2 MiB/s => 75.3 MiB/s

I also tried the idea from the deleted comment in this commit and it
made the throughput worse.

```

## Parents

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

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