minotar/imgd — pull request #111 by connor4312 (2014-12-09 04:14:12+00:00)
Title: Faster drawing function

Go's draw function has to take into account alpha transparency and blending when drawing images, but Minecraft skins don't have partially transparent components. With this knowledge, we can create a simpler, faster function, with a speed increase up to 5x in some cases.

```
Before:
BenchmarkSetup	2000000000	0.00 ns/op
BenchmarkGetHead	2000000	843 ns/op
BenchmarkGetHelm	200000	13064 ns/op
BenchmarkGetBody	100000	25182 ns/op
BenchmarkGetBust	50000	32185 ns/op

After:
BenchmarkSetup	2000000000	0.00 ns/op
BenchmarkGetHead	2000000	851 ns/op
BenchmarkGetHelm	1000000	2300 ns/op
BenchmarkGetBody	200000	12920 ns/op
BenchmarkGetBust	100000	14828 ns/op
```