Open wstaelens opened 2 years ago
My wild guess is that List<T>
didnt exist when the code was written.
Also they are basically identical in terms of code, the only improvement here is getting rid of boxing in a few places, but mostly it wouldn't improve at all.
@IAmTheCShark just search arraylist VS list
WPF/XPS code should be made up-to-date for .net (core).
(My 1st hit: https://stackoverflow.com/a/59379803 )
@IAmTheCShark just search arraylist VS list and you will find many reasons why it will boost performance.
WPF/XPS code should be made up-to-date for .net (core).
(My 1st hit: https://stackoverflow.com/a/59379803 )
Again, the only difference is when value types are involved (boxing), and that is not so often.
Look at your first Link when List<string>
is compared to ArrayList
in below the screenshots.
https://github.com/dotnet/wpf/blob/89d172db0b7a192de720c6cfba5e28a1e7d46123/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Primitive.cs#L1999
ArrayList? why not List?
https://github.com/dotnet/wpf/blob/89d172db0b7a192de720c6cfba5e28a1e7d46123/src/Microsoft.DotNet.Wpf/src/ReachFramework/AlphaFlattener/Flattener.cs#L101
https://github.com/dotnet/wpf/blob/89d172db0b7a192de720c6cfba5e28a1e7d46123/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Markup/XamlStream.cs#L577
https://github.com/dotnet/wpf/search?l=C%23&q=arraylist
all versions