From 252ccc84a29373ed64366db89fcd91acd2be0af7 Mon Sep 17 00:00:00 2001 From: jst Date: Mon, 8 Jul 2013 20:55:46 +0200 Subject: [PATCH] Add benchmarks for Lanczos3Lut to compare it with Lanczos3 performance. --- resize_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/resize_test.go b/resize_test.go index 5ddf811..909fa35 100644 --- a/resize_test.go +++ b/resize_test.go @@ -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))