View Code? Open in Web Editor
NEW
This project forked from dotnet /runtime
.NET is a cross-platform runtime and libraries, for cloud, IoT and desktop apps. It includes a garbage collector, JIT compiler, primitive data types and class libraries.
Home Page: https://docs.microsoft.com/dotnet/core/
License: MIT License
Batchfile 0.03%
Shell 0.17%
PowerShell 0.06%
CMake 0.15%
Python 0.21%
C# 79.66%
C++ 10.63%
C 8.00%
Perl 0.01%
Assembly 0.30%
Yacc 0.03%
Makefile 0.01%
Roff 0.15%
XSLT 0.09%
HTML 0.01%
OpenEdge ABL 0.03%
Dockerfile 0.01%
Visual Basic .NET 0.44%
Objective-C 0.02%
Ruby 0.01%
dotnet-runtime's People
Watchers
dotnet-runtime's Issues
public static int IndexOfAny ( ref byte searchSpace , int searchSpaceLength , ref byte value , int valueLength )
{
Debug. Assert ( searchSpaceLength >= 0 ) ;
Debug. Assert ( valueLength >= 0 ) ;
if ( valueLength == 0 )
return - 1 ; // A zero-length set of values is always treated as "not found".
int offset = - 1 ;
for ( int i = 0 ; i < valueLength ; i ++ )
{
int tempIndex = IndexOf( ref searchSpace, Unsafe. Add ( ref value, i) , searchSpaceLength) ;
if ( ( uint ) tempIndex < ( uint ) offset)
{
offset = tempIndex ;
// Reduce space for search, cause we don't care if we find the search value after the index of a previously found value
searchSpaceLength = tempIndex ;
if ( offset == 0 )
break ;
}
}
return offset ;
Seeks over the whole searchSpace
over and over, possible evicting data from the L1-cache.
For idea see loop strip mining .