mirror of https://github.com/SixLabors/ImageSharp
Browse Source
Former-commit-id: 006050b92f52249aa660d7ee0215782bff582c89 Former-commit-id: 79db24d98a125ff43dc80774640d0ce4e558c63a Former-commit-id: cf230c3526bcbb1c6f54d449e0cd46458597c100af/merge-core
3 changed files with 27 additions and 4 deletions
@ -0,0 +1,23 @@ |
|||
using BenchmarkDotNet.Attributes; |
|||
|
|||
namespace ImageProcessorCore.Benchmarks |
|||
{ |
|||
using System.Drawing; |
|||
|
|||
using CoreColor = ImageProcessorCore.Color; |
|||
|
|||
public class Colors |
|||
{ |
|||
[Benchmark(Baseline = true, Description = "System.Drawing Color")] |
|||
public bool SystemDrawingColorEqual() |
|||
{ |
|||
return Color.FromArgb(128, 128, 128, 128).Equals(Color.FromArgb(128, 128, 128, 128)); |
|||
} |
|||
|
|||
[Benchmark(Description = "ImageProcessorCore Color")] |
|||
public bool ColorEqual() |
|||
{ |
|||
return new CoreColor(.5f, .5f, .5f, .5f).Equals(new CoreColor(.5f, .5f, .5f, .5f)); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue