Made small changes to improve performance, such as changing String.StartsWith calls to char comparisons.
Added performance test which is useful to run in profiler and compare with older versions to see improvements.