Skip to content

Instantly share code, notes, and snippets.

@antonfirsov
Last active April 21, 2019 21:49
Show Gist options
  • Save antonfirsov/61715f4f58809f5777cb1329c4ec5358 to your computer and use it in GitHub Desktop.
Save antonfirsov/61715f4f58809f5777cb1329c4ec5358 to your computer and use it in GitHub Desktop.

DecodeJpegParseStreamOnly

Runs JpegDecoderCore.ParseStream() on jpeg420exif.jpg

Setup

BenchmarkDotNet=v0.11.5, OS=Windows 10.0.17134.706 (1803/April2018Update/Redstone4)
Intel Core i7-7700HQ CPU 2.80GHz (Kaby Lake), 1 CPU, 8 logical and 4 physical cores
Frequency=2742189 Hz, Resolution=364.6722 ns, Timer=TSC
.NET Core SDK=2.2.202
  [Host] : .NET Core 2.1.9 (CoreCLR 4.6.27414.06, CoreFX 4.6.27415.01), 64bit RyuJIT
  Clr    : .NET Framework 4.7.2 (CLR 4.0.30319.42000), 64bit RyuJIT-v4.7.3394.0
  Core   : .NET Core 2.1.9 (CoreCLR 4.6.27414.06, CoreFX 4.6.27415.01), 64bit RyuJIT

IterationCount=3  LaunchCount=1  WarmupCount=3

Before mango port

|                      Method |  Job | Runtime |            TestImage |     Mean |    Error |    StdDev | Ratio | RatioSD |    Gen 0 | Gen 1 | Gen 2 | Allocated |
|---------------------------- |----- |-------- |--------------------- |---------:|---------:|----------:|------:|--------:|---------:|------:|------:|----------:|
|       'System.Drawing FULL' |  Clr |     Clr | Jpg/b(...)f.jpg [28] | 23.20 ms | 7.320 ms | 0.4013 ms |  1.00 |    0.00 | 218.7500 |     - |     - | 757.88 KB |
| JpegDecoderCore.ParseStream |  Clr |     Clr | Jpg/b(...)f.jpg [28] | 23.45 ms | 2.375 ms | 0.1302 ms |  1.01 |    0.02 |        - |     - |     - |   19.5 KB |
|                             |      |         |                      |          |          |           |       |         |          |       |       |           |
|       'System.Drawing FULL' | Core |    Core | Jpg/b(...)f.jpg [28] | 23.00 ms | 1.469 ms | 0.0805 ms |  1.00 |    0.00 | 218.7500 |     - |     - | 757.04 KB |
| JpegDecoderCore.ParseStream | Core |    Core | Jpg/b(...)f.jpg [28] | 22.13 ms | 1.852 ms | 0.1015 ms |  0.96 |    0.00 |        - |     - |     - |  19.48 KB |

After mango port

|                      Method |  Job | Runtime |            TestImage |     Mean |     Error |    StdDev | Ratio | RatioSD |    Gen 0 | Gen 1 | Gen 2 | Allocated |
|---------------------------- |----- |-------- |--------------------- |---------:|----------:|----------:|------:|--------:|---------:|------:|------:|----------:|
|       'System.Drawing FULL' |  Clr |     Clr | Jpg/b(...)f.jpg [28] | 23.34 ms | 14.066 ms | 0.7710 ms |  1.00 |    0.00 | 218.7500 |     - |     - | 757.88 KB |
| JpegDecoderCore.ParseStream |  Clr |     Clr | Jpg/b(...)f.jpg [28] | 22.27 ms | 30.881 ms | 1.6927 ms |  0.95 |    0.07 |        - |     - |     - |     16 KB |
|                             |      |         |                      |          |           |           |       |         |          |       |       |           |
|       'System.Drawing FULL' | Core |    Core | Jpg/b(...)f.jpg [28] | 22.71 ms |  5.857 ms | 0.3211 ms |  1.00 |    0.00 | 218.7500 |     - |     - | 757.04 KB |
| JpegDecoderCore.ParseStream | Core |    Core | Jpg/b(...)f.jpg [28] | 18.05 ms |  6.036 ms | 0.3308 ms |  0.79 |    0.01 |        - |     - |     - |  11.76 KB |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment