diff options
| author | r00ster91 <r00ster91@proton.me> | 2022-10-16 17:44:31 +0200 |
|---|---|---|
| committer | r00ster91 <r00ster91@proton.me> | 2022-12-09 21:57:17 +0100 |
| commit | 19dbc5805c440dbfb22bbd3e75c7ec706655bb19 (patch) | |
| tree | f48cf08ae4d484b5887a4f4f25a895c6ffb25d3c /lib/std/array_list.zig | |
| parent | 626e02a429218fd194111320057fc4f2e8ceecda (diff) | |
| download | zig-19dbc5805c440dbfb22bbd3e75c7ec706655bb19.tar.gz zig-19dbc5805c440dbfb22bbd3e75c7ec706655bb19.zip | |
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.
Diffstat (limited to 'lib/std/array_list.zig')
0 files changed, 0 insertions, 0 deletions
