# fix\(perf\): remove LUT · gitcafe/zig

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

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

Visibility: public

Requested revision: 19dbc5805c440dbfb22bbd3e75c7ec706655bb19

Requested commit: 19dbc5805c440dbfb22bbd3e75c7ec706655bb19

Commit: 19dbc5805c440dbfb22bbd3e75c7ec706655bb19

Tree: f48cf08ae4d484b5887a4f4f25a895c6ffb25d3c

Author: r00ster91

Committer: r00ster91

## Message

```
fix(perf): remove LUT

This makes it so that we no longer use a LUT (Look-Up Table):
* The code is much simpler and easier to understand now.
* Using a LUT means we rely on a warm cache.
  Relying on the cache like this results in inconsistent performance and in many cases codegen will be worse.
  Also as @topolarity once pointed out, in some cases while it seems like the code may branch, it actually doesn't:
  https://github.com/ziglang/zig/pull/11629#issuecomment-1213641429
* Other languages' standard libraries don't do this either.
  JFF I wanted to see what other languages codegen compared to us now:
  https://rust.godbolt.org/z/Te4ax9Edf, https://zig.godbolt.org/z/nTbYedWKv
  So we are pretty much on par or better than other languages now.

```

## Parents

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

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