diff --git a/README.md b/README.md index a0661ba9..ca78c693 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ keep entire images in memory, it's light. For example, the `NetVips` benchmark: [NetVips.Benchmarks](https://github.com/kleisauke/net-vips/tree/master/tests/NetVips.Benchmarks) Loads a large image, shrinks by 10%, sharpens, and saves again. On this test -`NetVips` is around 23 times faster than Magick.NET and 3 times faster than ImageSharp. +`NetVips` is around 20 times faster than Magick.NET and 3 times faster than ImageSharp. The [libvips documentation](https://libvips.github.io/libvips/API/current) has a [chapter explaining how libvips opens diff --git a/docs/index.md b/docs/index.md index 7073429e..2a563bb4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -34,7 +34,7 @@ _disableFooter: true

Runs quickly and uses little memory

NetVips is fast and needs little memory. The NetVips.Benchmarks project tests NetVips against Magick.NET and ImageSharp. - NetVips is around 23 times faster than Magick.NET and 3 times faster than ImageSharp.

+ NetVips is around 20 times faster than Magick.NET and 3 times faster than ImageSharp.

diff --git a/tests/NetVips.Benchmarks/NetVips.Benchmarks.csproj b/tests/NetVips.Benchmarks/NetVips.Benchmarks.csproj index f8bbb68e..73d9018b 100644 --- a/tests/NetVips.Benchmarks/NetVips.Benchmarks.csproj +++ b/tests/NetVips.Benchmarks/NetVips.Benchmarks.csproj @@ -17,12 +17,12 @@ - - - - - - + + + + + + diff --git a/tests/NetVips.Benchmarks/README.md b/tests/NetVips.Benchmarks/README.md index d7e433b6..3a00eba9 100644 --- a/tests/NetVips.Benchmarks/README.md +++ b/tests/NetVips.Benchmarks/README.md @@ -10,31 +10,31 @@ of VIPS library. ## Benchmarks -Run on 24/03/23 with libvips 8.14.2, Magick.NET 13.0.0, ImageSharp 3.0.0, SkiaSharp 2.88.3 and System.Drawing.Common 7.0.0. +Run on 18/11/23 with libvips 8.15.0, Magick.NET 13.4.0, ImageSharp 3.0.2, SkiaSharp 2.88.6 and System.Drawing.Common 8.0.0. -``` ini +``` -BenchmarkDotNet=v0.13.5, OS=Windows 11 (10.0.22621.1413/22H2/2022Update/SunValley2) -Intel Core i5-8600K CPU 3.60GHz (Coffee Lake), 1 CPU, 6 logical and 6 physical cores -.NET SDK=7.0.202 - [Host] : .NET 7.0.4 (7.0.423.11508), X64 RyuJIT AVX2 - .NET 7.0 CLI (NativeAOT) : .NET 7.0.4 (7.0.423.11508), X64 RyuJIT AVX2 +BenchmarkDotNet v0.13.10, Windows 11 (10.0.22631.2715/23H2/2023Update/SunValley3) +AMD Ryzen 9 7900, 1 CPU, 24 logical and 12 physical cores +.NET SDK 8.0.100 + [Host] : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 + .NET 8.0 CLI (NativeAOT) : .NET 8.0.0 (8.0.23.53103), X64 RyuJIT AVX2 -Job=.NET 7.0 CLI (NativeAOT) Runtime=NativeAOT 7.0 Toolchain=.NET 7.0 +Job=.NET 8.0 CLI (NativeAOT) Runtime=NativeAOT 8.0 Toolchain=.NET 8.0 ``` -| Method | input | output | Mean | Error | StdDev | Ratio | RatioSD | -|--------------------------- |------ |------- |-----------:|--------:|--------:|------:|--------:| -| **NetVips** | **t.jpg** | **t2.jpg** | **175.8 ms** | **1.33 ms** | **1.18 ms** | **1.00** | **0.00** | -| Magick.NET | t.jpg | t2.jpg | 3,582.5 ms | 5.45 ms | 4.83 ms | 20.38 | 0.15 | -| ImageSharp | t.jpg | t2.jpg | 508.3 ms | 2.54 ms | 2.25 ms | 2.89 | 0.02 | -| SkiaSharp1 | t.jpg | t2.jpg | 1,991.4 ms | 7.27 ms | 6.07 ms | 11.34 | 0.06 | -| System.Drawing2 | t.jpg | t2.jpg | 2,407.3 ms | 5.26 ms | 4.66 ms | 13.69 | 0.09 | -| | | | | | | | | -| **NetVips** | **t.tif** | **t2.tif** | **131.7 ms** | **0.96 ms** | **0.80 ms** | **1.00** | **0.00** | -| Magick.NET | t.tif | t2.tif | 3,443.5 ms | 5.82 ms | 5.44 ms | 26.14 | 0.18 | -| ImageSharp | t.tif | t2.tif | 382.6 ms | 5.25 ms | 4.91 ms | 2.90 | 0.04 | -| System.Drawing2 | t.tif | t2.tif | 2,063.0 ms | 4.03 ms | 3.77 ms | 15.66 | 0.09 | +| Method | input | output | Mean | Error | StdDev | Ratio | RatioSD | +|--------------------------- |------ |------- |------------:|---------:|---------:|------:|--------:| +| **NetVips** | **t.jpg** | **t2.jpg** | **105.43 ms** | **2.054 ms** | **2.522 ms** | **1.00** | **0.00** | +| Magick.NET | t.jpg | t2.jpg | 1,741.20 ms | 6.126 ms | 5.116 ms | 16.44 | 0.46 | +| ImageSharp | t.jpg | t2.jpg | 336.34 ms | 4.142 ms | 3.672 ms | 3.17 | 0.08 | +| SkiaSharp1 | t.jpg | t2.jpg | 895.18 ms | 5.438 ms | 4.541 ms | 8.45 | 0.24 | +| System.Drawing2 | t.jpg | t2.jpg | 1,435.57 ms | 2.944 ms | 2.754 ms | 13.55 | 0.37 | +| | | | | | | | | +| **NetVips** | **t.tif** | **t2.tif** | **65.26 ms** | **1.258 ms** | **1.235 ms** | **1.00** | **0.00** | +| Magick.NET | t.tif | t2.tif | 1,647.24 ms | 4.682 ms | 4.380 ms | 25.27 | 0.49 | +| ImageSharp | t.tif | t2.tif | 250.84 ms | 2.152 ms | 2.013 ms | 3.85 | 0.07 | +| System.Drawing2 | t.tif | t2.tif | 1,212.72 ms | 4.588 ms | 4.292 ms | 18.61 | 0.36 | 1 SkiaSharp does not have TIFF support, so I only tested with JPEG files. 2 System.Drawing does not have a sharpening or convolution operation, so I skipped that part of the benchmark.