I have some code I wrote whilst programming a calculator. Basically the code will loop 53 thousand times before it then writes 53 thousand items to a ListBox control. I'm fairly new to programming, and the only optimization I thought practical to implement to optimize the speed of the program was to swap out my inter data types for shorts and constants where possible.
I can't post the entirety of my code for fear of being plagiarized. But I can elaborate on anything you may have questions about in posts below.
Here's the loop:
![Name: Capture.PNG
Views: 68
Size: 18.3 KB]()
Right now I'm getting my results in a minute and 20 seconds on a quad core. As I'm posting this I'm realizing I can remove the loop subtracting 255 from subIncrement, from the loop containing it, and change subIncrement to a short data type.
Any input on this is appreciated. :)
I can't post the entirety of my code for fear of being plagiarized. But I can elaborate on anything you may have questions about in posts below.
Here's the loop:
Right now I'm getting my results in a minute and 20 seconds on a quad core. As I'm posting this I'm realizing I can remove the loop subtracting 255 from subIncrement, from the loop containing it, and change subIncrement to a short data type.
Any input on this is appreciated. :)