# x64: optimise element offset calculation if dealing with immediates · gitcafe/zig

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

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

Visibility: public

Requested revision: 0c727604540df7dbff4f57e4599fa01e01b36695

Requested commit: 0c727604540df7dbff4f57e4599fa01e01b36695

Commit: 0c727604540df7dbff4f57e4599fa01e01b36695

Tree: a0804a6b8417b5c80360b394a87e583caf1a38b7

Author: Jakub Konka

Committer: Jakub Konka

## Message

```
x64: optimise element offset calculation if dealing with immediates

If `index` MCValue is actually an immediate, we can calculate offset
directly at "comptime" rather than at runtime.

```

## Parents

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

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