Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DesplazamientoIzquierdaPotenciasDeDos
- {
- static void Main()
- {
- System.Diagnostics.Stopwatch cronometro = new System.Diagnostics.Stopwatch();
- cronometro.Start();
- byte potenciaConBitwise = 1 << 7;
- cronometro.Stop();
- Console.WriteLine("Tiempo transcurrido: {0}", cronometro.Elapsed.TotalMilliseconds); // 0.0020 (puede variar)
- cronometro.Reset();
- cronometro.Start();
- byte potenciaConMathPow = (byte) Math.Pow(2, 7);
- Console.WriteLine("Tiempo transcurrido: {0}", cronometro.Elapsed.TotalMilliseconds); // 0.0066 (puede variar)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement