public void SequenceEqualListAndArray() { var a = LinqFaster.SequenceEqualF(intList, intArray); var b = Enumerable.SequenceEqual(intList, intArray); Assert.That(a, Is.EqualTo(b)); }
public void RepeatList() { var a = LinqFaster.RepeatListF(2.0f, 10); var b = Enumerable.Repeat(2.0f, 10).ToList(); Assert.That(a, Is.EqualTo(b)); }
public void RangeList() { var a = LinqFaster.RangeListF(-100, 200); var b = Enumerable.Range(-100, 200).ToList(); Assert.That(a, Is.EqualTo(b)); }
public void RangeArray() { int[] a = LinqFaster.RangeArrayF(-100, 200); int[] b = Enumerable.Range(-100, 200).ToArray(); Assert.That(a, Is.EqualTo(b)); }
public void SequenceEqualList() { var intList2 = intList.ToList(); var a = LinqFaster.SequenceEqualF(intList, intList2); var b = Enumerable.SequenceEqual(intList, intList2); Assert.That(a, Is.EqualTo(b)); }
public void SequenceEqualList() { List <int> intList2 = intList.ToList(); bool a = LinqFaster.SequenceEqualF(intList, intList2); bool b = Enumerable.SequenceEqual(intList, intList2); Assert.That(a, Is.EqualTo(b)); }
public void SequenceNotEqualArray() { int[] testArray = { 1, 2, 3, 4, }; var a = LinqFaster.SequenceEqualF(intArray, testArray); var b = Enumerable.SequenceEqual(intArray, testArray); Assert.That(a, Is.EqualTo(b)); }
public void SequenceEqualArray() { var intArray2 = (int[])intArray.Clone(); var a = LinqFaster.SequenceEqualF(intArray, intArray2); var b = Enumerable.SequenceEqual(intArray, intArray2); Assert.That(a, Is.EqualTo(b)); }
public void SequenceNotEqualArray() { int[] intArray2 = (int[])intArray.Clone(); intArray2[3] = -10; bool a = LinqFaster.SequenceEqualF(intArray, intArray2); bool b = Enumerable.SequenceEqual(intArray, intArray2); Assert.That(a, Is.EqualTo(b)); }
public void SequenceNotEqualList() { var testList = intList.ToList(); testList[3] = -10; var a = LinqFaster.SequenceEqualF(intList, testList); var b = Enumerable.SequenceEqual(intList, testList); Assert.That(a, Is.EqualTo(b)); }
public int LinqFaster_SelectF() { var items = LinqFaster.SelectF(list, item => item * 2); var sum = 0; for (var index = 0; index < items.Count; index++) { sum += items[index]; } return(sum); }
public int LinqFaster_WhereF() { var items = LinqFaster.WhereF(list, item => (item & 0x01) == 0); var sum = 0; for (var index = 0; index < items.Count; index++) { sum += items[index]; } return(sum); }
public void SequenceNotEqualList() { var testList = new List <int>(); testList.Add(1); testList.Add(2); testList.Add(3); var a = LinqFaster.SequenceEqualF(intList, testList); var b = Enumerable.SequenceEqual(intList, testList); Assert.That(a, Is.EqualTo(b)); }
public void SequenceNotEqualListAndArray() { var testList = new List <int>(); int[] testArray = { 1, 2, 3, 4, }; testList.Add(1); testList.Add(2); testList.Add(3); var a = LinqFaster.SequenceEqualF(intArray, testList); var b = Enumerable.SequenceEqual(intArray, testList); Assert.That(a, Is.EqualTo(b)); }
public bool LinqFaster_Array() => LinqFaster.ContainsF(array, Count - 1, EqualityComparer <int> .Default);
public int[] RepeatFast() => LinqFaster.RepeatArrayF(5, TEST_SIZE);
public int LinqFaster_CountF() => LinqFaster.CountF(array, item => (item & 0x01) == 0);
public bool LinqFaster_ConstainsF() => LinqFaster.ContainsF(array, Count - 1, this);
public int[] IntArrayRepeatFast() { return(LinqFaster.RepeatArrayF(5, Benchmarks.TEST_SIZE)); }