# InternPool: pass by const pointer · gitcafe/zig

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

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

Visibility: public

Requested revision: 90a877f462fce8bee69ad366aac66805a7c00571

Requested commit: 90a877f462fce8bee69ad366aac66805a7c00571

Commit: 90a877f462fce8bee69ad366aac66805a7c00571

Tree: fd4271ea498f27ec12c5f9e10fd70cdd25de9279

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
InternPool: pass by const pointer

The Zig language allows the compiler to make this optimization
automatically. We should definitely make the compiler do that, and
revert this commit. However, that will not happen in this branch, and I
want to continue to explore achieving performance parity with
merge-base. So, this commit changes all InternPool parameters to be
passed by const pointer rather than by value.

I measured a 1.03x ± 0.03 speedup vs the previous commit compiling the
(set of passing) behavior tests. Against merge-base, this commit is
1.17x ± 0.04 slower, which is an improvement from the previous
measurement of 1.22x ± 0.02.

Related issue: #13510
Related issue: #14129
Related issue: #15688

```

## Parents

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

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