Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: use smaller types to prepresent same data
This commit switches several types from taking 4-bytes-per-pixel to a single byte per pixel. The behavior (so far as I can tell) is unchanged, but the speedup is noticable: goos: linux goarch: amd64 pkg: github.com/esimov/triangle cpu: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz BenchmarkDraw-4 25 2865398063 ns/op PASS ok github.com/esimov/triangle 74.604s Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
- Loading branch information
1 parent
2c1311f
commit b87e4d1
Showing
1 changed file
with
12 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters