Partial inlining
Ziggit
Partial inlining
There this function from std.Io that I can’t stop thinking about: https://codeberg.org/ziglang/zig/src/commit/23e69f7c5766c46c2b699762642f7134d916e515/lib/std/Io/Reader.zig#L1117 the function Reader.fill is split between Reader.fill that contains the early return case where nothing needs to be done, and Reader.fillUnbeffered where the actual prefill happen. This allows the early return branch to be inlined at the call site, and save the cost of a functon call in that case. So my question is s...
0 comments
No comments yet.