Ok this can't be possible, maybe I'm messing up something here.
private System.DateTime startTime = System.DateTime.Now;
/*script below with a oledb connect to mysql, a single (tiny) insert query, a file open, read a single line, and close, and 30 milliseconds worth of text parsing.*/
Console.WriteLine(System.DateTime.Now.Subtract(startTime).TotalSeconds);
This spits back 1 second when run on my 1.8Ghz machine.
A 1,400 line php program, with tons of text manipulation, including regular expressions, several loops, and about a hundred if statements and over 20 mysql queries runs in a third of the time.
Why is the C# program so slow? Did I just make a very big mistake deciding to rewrite my php program in C# to increase the speed?
private System.DateTime startTime = System.DateTime.Now;
/*script below with a oledb connect to mysql, a single (tiny) insert query, a file open, read a single line, and close, and 30 milliseconds worth of text parsing.*/
Console.WriteLine(System.DateTime.Now.Subtract(startTime).TotalSeconds);
This spits back 1 second when run on my 1.8Ghz machine.
A 1,400 line php program, with tons of text manipulation, including regular expressions, several loops, and about a hundred if statements and over 20 mysql queries runs in a third of the time.
Why is the C# program so slow? Did I just make a very big mistake deciding to rewrite my php program in C# to increase the speed?