The main thing I re-learned doing this is: the more you can do in compiled C# code, the faster it will run. Writing a for-loop in C# is absolutely the fastest way to iterate over characters -- even when you have to call it as a static method.
This means that the built-in .Split(<char>)
method is the fastest way to count a specific character (not necessarily the most memory efficient).
Here's the results on my local computer:
Average Command
------- -------
00:00:00.0000084 <# hardcoded value shows overhead #> 4