コード例 #1
0
        protected Clase02ArrayNormal decodificarClase02(String s)
        {
            Clase02ArrayNormal cOut = null;

            watch.Restart();
            Decodificador02A dec = new Decodificador02A();

            for (int i = 0; i < this.veces; i++)
            {
                Object cAux1A = null;
                cAux1A = dec.decode(s);
                cOut   = (Clase02ArrayNormal)cAux1A;
            }
            watch.Stop();
            Console.WriteLine("Decodificación con arrays A: " + watch.ElapsedMilliseconds + " milisegundos");

            watch.Restart();
            Decodificador02B dec1B = new Decodificador02B();

            for (int i = 0; i < this.veces; i++)
            {
                Object cAux1B = null;
                dec1B.decode(ref cAux1B, s);
                cOut = (Clase02ArrayNormal)cAux1B;
            }
            watch.Stop();
            Console.WriteLine("Decodificación con arrays B: " + watch.ElapsedMilliseconds + " milisegundos");

            watch.Restart();
            Type t = typeof(Fase02.Clase02ArrayNormal);

            for (int i = 0; i < this.veces; i++)
            {
                Object aux = s.decodificar(t);
            }
            watch.Stop();
            Console.WriteLine("Decodificación con arrays C: " + watch.ElapsedMilliseconds + " milisegundos");

            watch.Restart();
            for (int i = 0; i < this.veces; i++)
            {
                SerializerStatic.decode(ref cOut, s);
            }
            watch.Stop();
            Console.WriteLine("Decodificación con arrays D: " + watch.ElapsedMilliseconds + " milisegundos");

            return(cOut);
        }
コード例 #2
0
        protected Clase02ArrayNormal decodificarClase02(String s)
        {
            Clase02ArrayNormal cOut = null;

            watch.Restart();
            Decodificador02A dec = new Decodificador02A();
            for (int i = 0; i < this.veces; i++)
            {
                Object cAux1A = null;
                cAux1A = dec.decode(s);
                cOut = (Clase02ArrayNormal)cAux1A;
            }
            watch.Stop();
            Console.WriteLine("Decodificación con arrays A: " + watch.ElapsedMilliseconds + " milisegundos");

            watch.Restart();
            Decodificador02B dec1B = new Decodificador02B();
            for (int i = 0; i < this.veces; i++)
            {
                Object cAux1B = null;
                dec1B.decode(ref cAux1B, s);
                cOut = (Clase02ArrayNormal)cAux1B;
            }
            watch.Stop();
            Console.WriteLine("Decodificación con arrays B: " + watch.ElapsedMilliseconds + " milisegundos");

            watch.Restart();
            Type t = typeof(Fase02.Clase02ArrayNormal);
            for (int i = 0; i < this.veces; i++)
            {
                Object aux = s.decodificar(t);
            }
            watch.Stop();
            Console.WriteLine("Decodificación con arrays C: " + watch.ElapsedMilliseconds + " milisegundos");

            watch.Restart();
            for (int i = 0; i < this.veces; i++)
            {
                SerializerStatic.decode(ref cOut, s);
            }
            watch.Stop();
            Console.WriteLine("Decodificación con arrays D: " + watch.ElapsedMilliseconds + " milisegundos");

            return cOut;
        }