Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class Form1 : Form
- {
- Dictionary<int, Action> opcodes;
- Stopwatch watch = new Stopwatch();
- Action test = null;
- public Form1()
- {
- InitializeComponent();
- opcodes = new Dictionary<int, Action>();
- CreateEntries();
- }
- void CreateEntries()
- {
- for (int i = 0; i < 512; i++)
- opcodes.Add(i, NOP);
- }
- void NOP()
- {
- }
- private void Button1Clicked(object sender, EventArgs e)
- {
- watch.Start();
- test = opcodes[511];
- watch.Stop();
- MessageBox.Show("Time elapsed: " + watch.Elapsed);
- //test = null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement