Beispiel #1
0
        public static void SumVx_Tests(string data, ulong expected)
        {
            Assert.AreEqual(expected, DigitsSummer.Sum(data));
            Assert.AreEqual(expected, DigitsSummer.SumHash(data));
            Assert.AreEqual(expected, DigitsSummer.SumLinq(data));
            Assert.AreEqual(expected, DigitsSummer.SumPLinq(data));

            Assert.AreEqual(expected, DigitsSummer.SumV2(data));
            Assert.AreEqual(expected, DigitsSummer.SumV3(data));
            Assert.AreEqual(expected, DigitsSummer.SumV3_5(data));
            Assert.AreEqual(expected, DigitsSummer.SumV4(data));
            Assert.AreEqual(expected, DigitsSummer.SumVx(data));
            Assert.AreEqual(expected, DigitsSummer.SumVx2(data));
            Assert.AreEqual(expected, DigitsSummer.SumVx22(data));
            Assert.AreEqual(expected, DigitsSummer.SumVx23(data));
            Assert.AreEqual(expected, DigitsSummer.SumVx24(data));
        }
Beispiel #2
0
        //[Benchmark(Baseline = true)]
        //public ulong SumV4() => DigitsSummer.SumV4(Input);


        //[Benchmark]
        //public ulong SumVx() => DigitsSummer.SumVx(Input);

        //[Benchmark]
        //public ulong SumVx2() => DigitsSummer.SumVx2(_data);

        //[Benchmark]
        //public ulong SumVx22() => DigitsSummer.SumVx22(_data);

        //[Benchmark]
        public ulong SumVx23() => DigitsSummer.SumVx23(_data);