Skip to content

Instantly share code, notes, and snippets.

@hypeartist
Created February 8, 2022 13:07
Show Gist options
  • Save hypeartist/b20d81a7dbb00ef2c510a34d14c71123 to your computer and use it in GitHub Desktop.
Save hypeartist/b20d81a7dbb00ef2c510a34d14c71123 to your computer and use it in GitHub Desktop.
core-imaging-playground
BenchmarkDotNet=v0.13.1, OS=Windows 10.0.22000
Intel Core i7-4702MQ CPU 2.20GHz (Haswell), 1 CPU, 8 logical and 4 physical cores
.NET SDK=6.0.101
[Host] : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT [AttachedDebugger]
ShortRun : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT
Job=ShortRun Arguments=/p:DebugType=portable IterationCount=5
LaunchCount=1 WarmupCount=5
| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |
|-------------------------- |----------:|-----------:|----------:|------:|--------:|---------:|---------:|---------:|----------:|
| 'System.Drawing Resize' | 15.759 ms | 1.7465 ms | 0.4536 ms | 1.00 | 0.00 | - | - | - | 144 B |
| 'ImageSharp Resize' | 4.330 ms | 0.1051 ms | 0.0163 ms | 0.27 | 0.01 | - | - | - | 10,223 B |
| 'ImageMagick Resize' | 80.920 ms | 34.3880 ms | 5.3216 ms | 5.10 | 0.31 | - | - | - | 6,760 B |
| 'FreeImage Resize' | 12.317 ms | 1.1340 ms | 0.1755 ms | 0.78 | 0.02 | 500.0000 | 500.0000 | 500.0000 | 312 B |
| 'MagicScaler Resize' | 1.611 ms | 0.0048 ms | 0.0007 ms | 0.10 | 0.00 | - | - | - | 1,674 B |
| 'SkiaSharp Canvas Resize' | 2.712 ms | 0.1200 ms | 0.0186 ms | 0.17 | 0.01 | - | - | - | 1,586 B |
| 'SkiaSharp Bitmap Resize' | 2.677 ms | 0.1108 ms | 0.0172 ms | 0.17 | 0.01 | - | - | - | 490 B |
| 'NetVips Resize' | 7.505 ms | 0.2505 ms | 0.0388 ms | 0.47 | 0.01 | - | - | - | 3,867 B |
// * Legends *
Mean : Arithmetic mean of all measurements
Error : Half of 99.9% confidence interval
StdDev : Standard deviation of all measurements
Ratio : Mean of the ratio distribution ([Current]/[Baseline])
RatioSD : Standard deviation of the ratio distribution ([Current]/[Baseline])
Gen 0 : GC Generation 0 collects per 1000 operations
Gen 1 : GC Generation 1 collects per 1000 operations
Gen 2 : GC Generation 2 collects per 1000 operations
Allocated : Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)
1 ms : 1 Millisecond (0.001 sec)
BenchmarkDotNet=v0.13.1, OS=Windows 10.0.22000
Intel Core i7-4702MQ CPU 2.20GHz (Haswell), 1 CPU, 8 logical and 4 physical cores
.NET SDK=6.0.101
[Host] : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT [AttachedDebugger]
ShortRun : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT
Job=ShortRun Arguments=/p:DebugType=portable IterationCount=5
LaunchCount=1 WarmupCount=5
| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |
|-------------------------------------- |---------:|---------:|---------:|------:|--------:|----------:|----------:|----------:|----------:|
| 'System.Drawing Load, Resize, Save' | 564.3 ms | 47.26 ms | 12.27 ms | 1.00 | 0.00 | - | - | - | 10 KB |
| 'ImageSharp Load, Resize, Save' | 219.9 ms | 6.97 ms | 1.08 ms | 0.39 | 0.01 | 333.3333 | - | - | 1,493 KB |
| 'ImageMagick Load, Resize, Save' | 619.1 ms | 44.00 ms | 11.43 ms | 1.10 | 0.03 | - | - | - | 52 KB |
| 'ImageFree Load, Resize, Save' | 383.8 ms | 15.83 ms | 4.11 ms | 0.68 | 0.01 | 6000.0000 | 6000.0000 | 6000.0000 | 93 KB |
| 'MagicScaler Load, Resize, Save' | 106.2 ms | 15.57 ms | 4.04 ms | 0.19 | 0.01 | - | - | - | 145 KB |
| 'SkiaSharp Canvas Load, Resize, Save' | 399.4 ms | 11.84 ms | 1.83 ms | 0.71 | 0.01 | - | - | - | 99 KB |
| 'SkiaSharp Bitmap Load, Resize, Save' | 424.9 ms | 69.65 ms | 10.78 ms | 0.76 | 0.02 | - | - | - | 85 KB |
| 'NetVips Load, Resize, Save' | 182.3 ms | 38.46 ms | 9.99 ms | 0.32 | 0.01 | - | - | - | 46 KB |
// * Legends *
Mean : Arithmetic mean of all measurements
Error : Half of 99.9% confidence interval
StdDev : Standard deviation of all measurements
Ratio : Mean of the ratio distribution ([Current]/[Baseline])
RatioSD : Standard deviation of the ratio distribution ([Current]/[Baseline])
Gen 0 : GC Generation 0 collects per 1000 operations
Gen 1 : GC Generation 1 collects per 1000 operations
Gen 2 : GC Generation 2 collects per 1000 operations
Allocated : Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)
1 ms : 1 Millisecond (0.001 sec)
BenchmarkDotNet=v0.13.1, OS=Windows 10.0.22000
Intel Core i7-4702MQ CPU 2.20GHz (Haswell), 1 CPU, 8 logical and 4 physical cores
.NET SDK=6.0.101
[Host] : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT [AttachedDebugger]
ShortRun : .NET 6.0.1 (6.0.121.56705), X64 RyuJIT
Job=ShortRun Arguments=/p:DebugType=portable IterationCount=5
LaunchCount=1 WarmupCount=5
| Method | Mean | Error | StdDev | Ratio | RatioSD | Gen 0 | Gen 1 | Gen 2 | Allocated |
|------------------------------------------------- |----------:|----------:|----------:|------:|--------:|----------:|----------:|----------:|----------:|
| 'System.Drawing Load, Resize, Save - Parallel' | 257.50 ms | 17.025 ms | 2.635 ms | 1.00 | 0.00 | - | - | - | 32 KB |
| 'ImageSharp Load, Resize, Save - Parallel' | 60.26 ms | 7.899 ms | 2.051 ms | 0.23 | 0.01 | - | - | - | 1,512 KB |
| 'ImageMagick Load, Resize, Save - Parallel' | 203.25 ms | 47.045 ms | 12.218 ms | 0.77 | 0.02 | - | - | - | 70 KB |
| 'ImageFree Load, Resize, Save - Parallel' | 113.89 ms | 16.114 ms | 4.185 ms | 0.44 | 0.01 | 3600.0000 | 3600.0000 | 3600.0000 | 112 KB |
| 'MagicScaler Load, Resize, Save - Parallel' | 29.78 ms | 3.761 ms | 0.977 ms | 0.11 | 0.00 | 31.2500 | - | - | 184 KB |
| 'SkiaSharp Canvas Load, Resize, Save - Parallel' | 100.78 ms | 18.248 ms | 4.739 ms | 0.39 | 0.02 | - | - | - | 119 KB |
| 'SkiaSharp Bitmap Load, Resize, Save - Parallel' | 111.49 ms | 26.685 ms | 4.130 ms | 0.43 | 0.01 | - | - | - | 103 KB |
| 'NetVips Load, Resize, Save - Parallel' | 67.51 ms | 17.128 ms | 2.651 ms | 0.26 | 0.01 | - | - | - | 70 KB |
// * Legends *
Mean : Arithmetic mean of all measurements
Error : Half of 99.9% confidence interval
StdDev : Standard deviation of all measurements
Ratio : Mean of the ratio distribution ([Current]/[Baseline])
RatioSD : Standard deviation of the ratio distribution ([Current]/[Baseline])
Gen 0 : GC Generation 0 collects per 1000 operations
Gen 1 : GC Generation 1 collects per 1000 operations
Gen 2 : GC Generation 2 collects per 1000 operations
Allocated : Allocated memory per single operation (managed only, inclusive, 1KB = 1024B)
1 ms : 1 Millisecond (0.001 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment