Zig implementation of Fibsonisheaf
Note
Default (if not specified) will be the naive
implementation
zig build -Doptimize=ReleaseFast -Dimplementation=linear run
using
Debug
mode will not work as it has safety measures against integer overflows, which have yet to be patched
You may also calculate a single fibonacci number by passing it's index as an argument
zig build -Doptimize=ReleaseFast -Dimplementation=fastexp run -- 4000000
zig build -Doptimize=ReleaseFast -Dimplementation=linear asm
will generate a [implementation]_[optimize].s
file under zig-out/asm
some additional flags you may use are:
Flag | Description |
---|---|
-Dprint_numbers=[bool] | print the numbers in the output |
-Duse_csv_fmt=[bool] | print the output using csv format |