Comment by sweeter

1 year ago

```sh

sweet@nadeko ~ $ mkcd test

sweet@nadeko ~/test $ zig init

info: created build.zig

info: created build.zig.zon

info: created src/main.zig

info: created src/root.zig

info: see `zig build --help` for a menu of options

sweet@nadeko ~/test $ time zig build

zig build 5.08s user 0.58s system 119% cpu 4.745 total

# cached

sweet@nadeko ~/test $ time zig build

zig build 0.01s user 0.03s system 132% cpu 0.026 total

# after rewriting the main function to call a function that takes a pointer to another function

sweet@nadeko ~/test $ time zig build

zig build 0.02s user 0.03s system 136% cpu 0.032 total

```