# stage2 parser: split out PrefixOp into separate AST Nodes · gitcafe/zig

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

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

Visibility: public

Requested revision: 14cef9dd3d8074b0dc2ee48a0905300ce6317aed

Requested commit: 14cef9dd3d8074b0dc2ee48a0905300ce6317aed

Commit: 14cef9dd3d8074b0dc2ee48a0905300ce6317aed

Tree: 246220eb1846d00a982c33d8e0fae5b5f4ee150c

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
stage2 parser: split out PrefixOp into separate AST Nodes

This is part of a larger effort to improve the memory layout of AST
nodes of the self-hosted parser to reduce wasted memory. Reduction of
wasted memory also translates to improved performance because of fewer
memory allocations, and fewer cache misses.

Compared to master, when running `zig fmt` on the std lib:

 * cache-misses: 801,829 => 768,624
 * instructions: 3,234,877,167 => 3,232,075,022
 * peak memory: 81480 KB => 75964 KB

```

## Parents

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

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