raytracer

command module
v0.0.0-...-e866bec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2020 License: GPL-3.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Raytracer

alt text

A simple raytracer implemented in Go to explore the profiling and optimization tooling that is provided by Go.

Original source

The source was apdapted from C++ source obtained from www.scratchapixel.com; released under GPL V3 or later.

Running and Analysing

The following command will build and run the raytracer.

go build && time ./raytracer

Use the following command to build, run and then analyse the cpu.pprof profile file.

go build && time ./raytracer &&  go tool pprof -http=:8080 cpu.pprof

Building and running the C++ Raytracer

Conan package manager and CMake are required to compile and build the program. Use the following commands to build and run the C++ version of the raytracer.

cd cpp # change directory into the cpp directory
conan install .
cmake . -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
cmake --build .
time bin/raytracer ../scene.json 

GopherCon 2019: Dave Cheney - Two Go Programs, Three Different Profiling Techniques #22: using the Go execution tracer

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址