# \`Namespace.decls\` use context to save memory · gitcafe/zig

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

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

Visibility: public

Requested revision: 29c32b3dc50218d15f779201e154d425fffcefeb

Requested commit: 29c32b3dc50218d15f779201e154d425fffcefeb

Commit: 29c32b3dc50218d15f779201e154d425fffcefeb

Tree: b16349f3069554879e6bb060d29357b3d93cc98f

Author: jagt

Committer: Veikka Tuominen

## Message

```
`Namespace.decls` use context to save memory

change `Module.Namespace.decls` from `AutoArrayHashMapUnmanaged` to
`ArrayHashMapUnmanaged(*Decl, void)` with custom context to eliminate
duplicated decl name strings.

Also see:
https://zig.news/andrewrk/how-to-use-hash-map-contexts-to-save-memory-when-doing-a-string-table-3l33

```

## Parents

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

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