Skip to content

Miou-zora/Zaytracer

Repository files navigation

Zaytracer (Raytracer in zig)

Rendered image of the raytracer

📑 Requirements

  • 🌸 zig 0.14

Usage

👷 Building

Release

zig build -Doptimize=ReleaseFast

Debug

zig build

🚀 Running

With zig build or zig build -Doptimize=ReleaseFast

# It will build the project and run it. (do nothing if the project is already built)
zig build run
# or you can run the executable directly
./zig-out/bin/Zaytracer

Perf

Performance measures

To take performance measures you can use th perf tool like this:

perf record -g ./Zaytracer
perf report -g 'graph,0.5,caller'

You will need a debug build for that, else you won't have debug symbols.

Time measures

You can use the hyperfine tool to measure the time of execution of the program.

After zig build -Doptimize=ReleaseFast:

hyperfine "./zig-out/bin/Zaytracer" --warmup 10

Contributors 3

  •  
  •  
  •