Better performance for string.CompareOrdinalHelper (dotnet/coreclr#6119)
- For 64-bit, process a `long` at a time (and 3 longs per iteration of the loop), since it's the largest word size of the processor. This is what other functions, like `EqualsHelper` or `StartsWithOrdinalHelper` do.
- Make sure we perform aligned reads on 64-bit platforms
- Strings (objects in general?) are allocated on an aligned word boundary (that is, divisible by 4/8). However, the offset to the chars (`OffsetToStringData`) is 12 on 64-bit platforms, meaning that if we read a long from the first char it will *not* be aligned. To fix this, first check for differences in the first/second chars and start the loop from there.
- Used `goto` within the loop code, so we don't have to keep making jumps in the common case.
I also removed a comment above the `String` class that seems to be outdated (seeing as there is no string constructor that accepts another string).
Commit migrated from https://github.com/dotnet/coreclr/commit/
719c34f3fc205093cb137e73c608f3b58e1a144f