Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » Utilities » Downloads
 
Add your own
alternative version

Comparative Speed Testing

, 28 May 2008 CPOL
A simple-to-use class for performing comparative, non-benchmarked speed tests when optimising code for execution speed.
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
    Me.RichTextBox1 = New System.Windows.Forms.RichTextBox
    Me.Button1 = New System.Windows.Forms.Button
    Me.Button2 = New System.Windows.Forms.Button
    Me.Button3 = New System.Windows.Forms.Button
    Me.Button4 = New System.Windows.Forms.Button
    Me.TextBox1 = New System.Windows.Forms.TextBox
    Me.Label1 = New System.Windows.Forms.Label
    Me.SuspendLayout()
    '
    'RichTextBox1
    '
    Me.RichTextBox1.Location = New System.Drawing.Point(12, 41)
    Me.RichTextBox1.Name = "RichTextBox1"
    Me.RichTextBox1.Size = New System.Drawing.Size(768, 513)
    Me.RichTextBox1.TabIndex = 0
    Me.RichTextBox1.Text = ""
    '
    'Button1
    '
    Me.Button1.Location = New System.Drawing.Point(12, 12)
    Me.Button1.Name = "Button1"
    Me.Button1.Size = New System.Drawing.Size(60, 23)
    Me.Button1.TabIndex = 1
    Me.Button1.Text = "Clear"
    Me.Button1.UseVisualStyleBackColor = True
    '
    'Button2
    '
    Me.Button2.Location = New System.Drawing.Point(338, 12)
    Me.Button2.Name = "Button2"
    Me.Button2.Size = New System.Drawing.Size(60, 23)
    Me.Button2.TabIndex = 2
    Me.Button2.Text = "Test 1"
    Me.Button2.UseVisualStyleBackColor = True
    '
    'Button3
    '
    Me.Button3.Location = New System.Drawing.Point(404, 12)
    Me.Button3.Name = "Button3"
    Me.Button3.Size = New System.Drawing.Size(60, 23)
    Me.Button3.TabIndex = 3
    Me.Button3.Text = "Test 2"
    Me.Button3.UseVisualStyleBackColor = True
    '
    'Button4
    '
    Me.Button4.Location = New System.Drawing.Point(470, 12)
    Me.Button4.Name = "Button4"
    Me.Button4.Size = New System.Drawing.Size(60, 23)
    Me.Button4.TabIndex = 4
    Me.Button4.Text = "Test 3"
    Me.Button4.UseVisualStyleBackColor = True
    '
    'TextBox1
    '
    Me.TextBox1.Location = New System.Drawing.Point(199, 14)
    Me.TextBox1.Name = "TextBox1"
    Me.TextBox1.Size = New System.Drawing.Size(84, 20)
    Me.TextBox1.TabIndex = 5
    Me.TextBox1.Text = "100000"
    '
    'Label1
    '
    Me.Label1.AutoSize = True
    Me.Label1.Location = New System.Drawing.Point(78, 17)
    Me.Label1.Name = "Label1"
    Me.Label1.Size = New System.Drawing.Size(115, 13)
    Me.Label1.TabIndex = 6
    Me.Label1.Text = "Number of Repetitions:"
    Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
    '
    'Form1
    '
    Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
    Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
    Me.ClientSize = New System.Drawing.Size(792, 566)
    Me.Controls.Add(Me.Label1)
    Me.Controls.Add(Me.TextBox1)
    Me.Controls.Add(Me.Button4)
    Me.Controls.Add(Me.Button3)
    Me.Controls.Add(Me.Button2)
    Me.Controls.Add(Me.Button1)
    Me.Controls.Add(Me.RichTextBox1)
    Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
    Me.MaximizeBox = False
    Me.Name = "Form1"
    Me.Text = "ZED Speed Test"
    Me.ResumeLayout(False)
    Me.PerformLayout()

  End Sub
  Friend WithEvents RichTextBox1 As System.Windows.Forms.RichTextBox
  Friend WithEvents Button1 As System.Windows.Forms.Button
  Friend WithEvents Button2 As System.Windows.Forms.Button
  Friend WithEvents Button3 As System.Windows.Forms.Button
  Friend WithEvents Button4 As System.Windows.Forms.Button
  Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
  Friend WithEvents Label1 As System.Windows.Forms.Label

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Warrick Procter
ZED
New Zealand New Zealand
A DEC PDP/11 BasicPlus2 developer from the 80s.

| Advertise | Privacy | Mobile
Web01 | 2.8.141022.2 | Last Updated 29 May 2008
Article Copyright 2008 by Warrick Procter
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid