Add benchmarks for Lanczos3Lut to compare it with Lanczos3 performance.

This commit is contained in:
jst 2013-07-08 20:55:46 +02:00
parent 098f882331
commit 252ccc84a2

View File

@ -53,7 +53,7 @@ func Test_CorrectResize(t *testing.T) {
}
}
func Benchmark_BigResize(b *testing.B) {
func Benchmark_BigResizeLanczos3(b *testing.B) {
var m image.Image
for i := 0; i < b.N; i++ {
m = Resize(1000, 1000, img, Lanczos3)
@ -61,6 +61,14 @@ func Benchmark_BigResize(b *testing.B) {
m.At(0, 0)
}
func Benchmark_BigResizeLanczos3Lut(b *testing.B) {
var m image.Image
for i := 0; i < b.N; i++ {
m = Resize(1000, 1000, img, Lanczos3Lut)
}
m.At(0, 0)
}
func Benchmark_Reduction(b *testing.B) {
largeImg := image.NewRGBA(image.Rect(0, 0, 1000, 1000))