SVG
SVG copied to clipboard
Performance optimization for SvgPointCollectionConverter parser
Reference Issue
Split from #786
What does this implement/fix? Explain your changes.
Performance optimizations for SvgPointCollectionConverter parser
dotnet run -c Release -f netcoreapp3.1 -- -f '*SvgPointCollectionConverter_*'
- with CoordinateParser
Method | Mean | Error | StdDev | Op/s | Rank | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
SvgPointCollectionConverter_Parse | 495.0 ns | 5.43 ns | 5.08 ns | 2,020,232.5 | 1 | 0.0067 | - | - | 136 B |
- with StringSplitEnumerator
Method | Mean | Error | StdDev | Op/s | Rank | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
SvgPointCollectionConverter_Parse | 460.4 ns | 3.17 ns | 2.81 ns | 2,171,837.9 | 1 | 0.0072 | - | - | 136 B |
Any other comments?
I think this can now be merged because. The Roslyn Compiler can soon do switches on ReadonlySpans see issue. https://github.com/dotnet/csharplang/issues/1881