Great to see your optimizations.
I'm going through each day and asking ChatGPT to speed it up, it doesn't always work, but that is the way of the Gippity.
The payoff is these heavy iterating operational scripts I run for work will end up running faster :)
Learning when to lean on some of the .NET primitives really helps speed up PS as it likes to wrap things with unnecessary features.