pastebin - collaborative debugging tool
kpaste.net RSS


t
Posted by Anonymous on Sat 1st Oct 2022 15:16
raw | new post

  1. using System.Diagnostics;
  2. public class Program{
  3.   public const int n=100_0000;
  4.   public delegate void a();
  5.   public static void Main(String[] args){
  6.     a t=()=>{};
  7.     var ti=new Stopwatch();
  8.     ti.Start();
  9.     for(int i=0;i<n;i++)
  10.       t();
  11.     ti.Stop();
  12.     Console.WriteLine(ti.ElapsedTicks/(decimal)Stopwatch.Frequency/(decimal)n+"s/op");
  13.   }
  14. }

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at