インメモリbyte[]
があり、オフセットの場所13
と位置を特定する必要があり10
ます。次に、次を使用してその行を抽出します。
String oneLine = Encoding.ASCII.GetString(bytes, 0, max);
x64 ビット コンピューターで 2 バイトを検索する最速の方法は何ですか? ..そしてそれを文字列に変換しますか?
13
各バイトを繰り返し、スキャンしてからスキャンする以外にできることはあり10
ますか?
// Disclaimer:
// This is just for my curiosity. Perhaps I'll gain a better understanding of
// how .NET interfaces with RAM, the CPU instructions related to comparisons, etc.
//
// I don't suspect a performance problem, but I do suspect a lack of understanding
// (on my part) on how C# does low-level operations.