# Stop using LinearFifo in BufferedWriter · gitcafe/zig

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

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

Visibility: public

Requested revision: 7287c7482a2c694c7c7f56b9f7c1744a7ae7905f

Requested commit: 7287c7482a2c694c7c7f56b9f7c1744a7ae7905f

Commit: 7287c7482a2c694c7c7f56b9f7c1744a7ae7905f

Tree: 9a8a3ace5afc9d45a17b9e07f6d1bdf3055e2a78

Author: Jimmi Holst Christensen

Committer: Andrew Kelley

## Message

```
Stop using LinearFifo in BufferedWriter

Looking at the BufferedWriter assembly generated, one can see that is
has to do a lot of work, just to copy over some bytes and increase an
offset. This is because the LinearFifo is a much more general construct
than what BufferedWriter needs and the optimizer cannot prove that we
don't need to do this extra work.

```

## Parents

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

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