Skip to content

[BUG] ContainsS returns different result to Contains #31

@Lukazoid

Description

@Lukazoid
void Main()
{
    var max = 999999;

    var nums = Enumerable.Range(0, max + 1).ToArray();

    Console.WriteLine(nums.ContainsS(max));
    Console.WriteLine(nums.Contains(max));
}

Outputs

False
True

Or another more simple example:

Console.WriteLine(new[]{1,2,3,4,5,6,7,8}.ContainsS(5));

It appears that .ContainsS fails for any of the last Vector<T>.Count elements when (haystack.Length % Vector<T>.Count) == 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions