Skip to content

[v2] Port SVG parsing fix and add SVG benchmarks#388

Closed
antonfirsov wants to merge 5 commits intorelease/v2.xfrom
af/v2-benchmark-x
Closed

[v2] Port SVG parsing fix and add SVG benchmarks#388
antonfirsov wants to merge 5 commits intorelease/v2.xfrom
af/v2-benchmark-x

Conversation

@antonfirsov
Copy link
Copy Markdown
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

I decided to do run a V3 vs main comparison for #377 which required me to port benchmarks and SVG fixes, given it's done, I decided to PR this change.

FillTiger results

V3

|        Method | Dimensions |      Mean |     Error |    StdDev |    Median | Ratio | RatioSD |
|-------------- |----------- |----------:|----------:|----------:|----------:|------:|--------:|
|     SkiaSharp |        100 |  1.121 ms | 0.0570 ms | 0.1598 ms |  1.076 ms |  1.00 |    0.00 |
| SystemDrawing |        100 |  2.124 ms | 0.0459 ms | 0.1352 ms |  2.099 ms |  1.94 |    0.29 |
|    ImageSharp |        100 | 14.051 ms | 0.3276 ms | 0.9294 ms | 13.927 ms | 12.78 |    1.86 |
|               |            |           |           |           |           |       |         |
|     SkiaSharp |       1000 |  7.891 ms | 0.1565 ms | 0.2571 ms |  7.897 ms |  1.00 |    0.00 |
| SystemDrawing |       1000 | 17.623 ms | 0.3452 ms | 0.5476 ms | 17.515 ms |  2.24 |    0.10 |
|    ImageSharp |       1000 | 62.901 ms | 1.6790 ms | 4.8710 ms | 61.231 ms |  8.19 |    0.80 |

main

From #377 (comment), putting here as reference:

|                    Method | Dimensions |        Mean |     Error |      StdDev |      Median | Ratio | RatioSD |
|-------------------------- |----------- |------------:|----------:|------------:|------------:|------:|--------:|
|                 SkiaSharp |        100 |    858.7 us |   3.06 us |     9.37 us |    856.0 us |  1.00 |    0.00 |
|             SystemDrawing |        100 |  2,075.6 us |  49.87 us |   157.60 us |  2,036.1 us |  2.43 |    0.18 |
|                ImageSharp |        100 |  4,650.1 us | 115.22 us |   369.13 us |  4,729.9 us |  5.46 |    0.43 |
| ImageSharp_SingleThreaded |        100 |  7,618.4 us | 983.83 us | 3,151.81 us |  6,174.6 us |  9.29 |    3.59 |
|          ImageSharpWebGPU |        100 |  2,425.6 us | 118.34 us |   356.26 us |  2,397.2 us |  2.83 |    0.42 |
|                           |            |             |           |             |             |       |         |
|                 SkiaSharp |       1000 |  7,399.4 us | 101.66 us |   321.24 us |  7,339.4 us |  1.00 |    0.00 |
|             SystemDrawing |       1000 | 17,367.9 us | 215.58 us |   681.25 us | 17,131.4 us |  2.35 |    0.15 |
|                ImageSharp |       1000 |  6,790.0 us | 768.78 us | 2,484.95 us |  6,386.2 us |  0.92 |    0.36 |
| ImageSharp_SingleThreaded |       1000 | 15,816.6 us | 191.37 us |   610.30 us | 15,862.8 us |  2.14 |    0.13 |
|          ImageSharpWebGPU |       1000 |  4,113.7 us | 285.05 us |   900.79 us |  3,796.4 us |  0.56 |    0.13 |

DrawingThroughputBenchmark

Around 110 MP/s (2000x2000) and around 6 MP/s for small (200x200) images. So the numbers are significantly lower than the same values from the PR, regardless of parallelism applied.

@antonfirsov
Copy link
Copy Markdown
Member Author

Closing because CI is drunk. I can't reproduce the build failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant