anthonynsimon / bild

Image processing algorithms in pure Go
MIT License
3.99k stars 213 forks source link

feat: improve adjust apply #77

Closed yangwenmai closed 4 years ago

yangwenmai commented 4 years ago

Benchmark Result

$ go test -run=apply_test.go -benchtime=1s -bench=^BenchmarkApply -cpuprofile=cpu.out -benchmem -memprofile=mem.out -trace trace.out -count=5 > old.txt
$ go test -run=apply_test.go -benchtime=1s -bench=^BenchmarkApply -cpuprofile=cpu.out -benchmem -memprofile=mem.out -trace trace.out -count=5 > new.txt

benchcmp old.txt new.txt Result:

benchmark                 old ns/op     new ns/op     delta
BenchmarkApply-8          216           208           -3.70%
BenchmarkApply-8          216           208           -3.70%
BenchmarkApply-8          216           207           -4.17%
BenchmarkApply-8          215           209           -2.79%
BenchmarkApply-8          216           210           -2.78%

benchmark                 old allocs     new allocs     delta
BenchmarkApply-8          3              3              +0.00%
BenchmarkApply-8          3              3              +0.00%
BenchmarkApply-8          3              3              +0.00%
BenchmarkApply-8          3              3              +0.00%
BenchmarkApply-8          3              3              +0.00%

benchmark                 old bytes     new bytes     delta
BenchmarkApply-8          112           112           +0.00%
BenchmarkApply-8          112           112           +0.00%
BenchmarkApply-8          112           112           +0.00%
BenchmarkApply-8          112           112           +0.00%
BenchmarkApply-8          112           112           +0.00%
yangwenmai commented 4 years ago

@anthonynsimon poke

anthonynsimon commented 4 years ago

Looks good! Thank you :)