@@ -1244,6 +1244,7 @@ unsafe bool StepMboxMarkerStart (byte* inbuf, ref bool midline)
1244
1244
1245
1245
if ( midline ) {
1246
1246
// we're in the middle of a line, so we need to scan for the end of the line
1247
+ // TODO: unroll this loop?
1247
1248
while ( * inptr != ( byte ) '\n ' )
1248
1249
inptr ++ ;
1249
1250
@@ -1267,6 +1268,7 @@ unsafe bool StepMboxMarkerStart (byte* inbuf, ref bool midline)
1267
1268
}
1268
1269
1269
1270
// scan for the end of the line
1271
+ // TODO: unroll this loop?
1270
1272
while ( * inptr != ( byte ) '\n ' )
1271
1273
inptr ++ ;
1272
1274
@@ -1296,6 +1298,7 @@ unsafe bool StepMboxMarker (byte* inbuf, out int count)
1296
1298
* inend = ( byte ) '\n ' ;
1297
1299
1298
1300
// scan for the end of the line
1301
+ // TODO: unroll this loop?
1299
1302
while ( * inptr != ( byte ) '\n ' )
1300
1303
inptr ++ ;
1301
1304
@@ -1503,6 +1506,7 @@ unsafe bool StepHeaderValue (byte* inbuf, ref bool midline)
1503
1506
#endif
1504
1507
1505
1508
while ( inptr < inend && ( midline || IsBlank ( * inptr ) ) ) {
1509
+ // TODO: unroll this loop?
1506
1510
#if FUNROLL_LOOPS
1507
1511
// Note: we can always depend on byte[] arrays being 4-byte aligned on 32bit and 64bit architectures
1508
1512
int alignment = ( index + 3 ) & ~ 3 ;
@@ -1593,6 +1597,7 @@ unsafe bool TryCheckBoundaryWithinHeaderBlock (byte* inbuf)
1593
1597
1594
1598
* inend = ( byte ) '\n ' ;
1595
1599
1600
+ // TODO: unroll this loop?
1596
1601
while ( * inptr != ( byte ) '\n ' )
1597
1602
inptr ++ ;
1598
1603
@@ -1808,6 +1813,7 @@ unsafe bool InnerSkipLine (byte* inbuf, bool consumeNewLine)
1808
1813
1809
1814
* inend = ( byte ) '\n ' ;
1810
1815
1816
+ // TODO: unroll this loop?
1811
1817
while ( * inptr != ( byte ) '\n ' )
1812
1818
inptr ++ ;
1813
1819
@@ -1961,6 +1967,7 @@ unsafe bool FoundImmediateBoundary (byte* inbuf, bool final)
1961
1967
1962
1968
* inend = ( byte ) '\n ' ;
1963
1969
1970
+ // TODO: unroll this loop?
1964
1971
while ( * inptr != ( byte ) '\n ' )
1965
1972
inptr++ ;
1966
1973
@@ -2183,6 +2190,7 @@ unsafe int ConstructMessagePart (byte* inbuf, int depth, CancellationToken cance
2183
2190
2184
2191
* inend = ( byte ) '\n ' ;
2185
2192
2193
+ // TODO: unroll this loop?
2186
2194
while ( * inptr != ( byte ) '\n ' )
2187
2195
inptr++ ;
2188
2196
0 commit comments