TLDR Web Dev · MISCELLANEOUS
WHY DOES AN EXTRANEOUS BUILD STEP MAKE MY ZIG APP 10X FASTER?
Summary from the TLDR Web Dev newsletter
This author built a Zig implementation of an Ethereum virtual machine with the aim of making it faster than the official Go version. A seemingly unrelated change to a benchmarking script made the Zig app slower. This was because commands in bash pipelines run in parallel, so a Zig app, when freshly compiled, has to wait for input from preceding commands. The author limited memory usage at compile time and used buffered reads to make his implementation faster than the official Go version.