Click here to Skip to main content
15,892,005 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionNET performance Pin
KEL316-May-07 1:57
KEL316-May-07 1:57 
AnswerNET performanc, me_again Pin
KEL325-May-07 3:43
KEL325-May-07 3:43 
GeneralRe: NET performanc, me_again Pin
Thomas Stockwell26-May-07 16:06
professionalThomas Stockwell26-May-07 16:06 
Question.NET Framework 2.0 Pin
Blumen15-May-07 23:52
Blumen15-May-07 23:52 
GeneralRe: .NET Framework 2.0 Pin
Ashwani kumar srivas16-May-07 0:40
Ashwani kumar srivas16-May-07 0:40 
AnswerRe: .NET Framework 2.0 [modified] Pin
spvarapu17-May-07 6:39
spvarapu17-May-07 6:39 
QuestionRunning a custom command line program. Pin
Jay B.15-May-07 11:05
Jay B.15-May-07 11:05 
QuestionDouble Datatype and .NET Pin
Ray Kinsella15-May-07 6:40
Ray Kinsella15-May-07 6:40 
Hi all,

I came across a funny and I hoped you could help, I was profiling the performance of different operations in .NET and I found that double operation was faster in debug mode, than in release mode. I created a small project to test this premise it can downloaded here.

double i, j, dTest = 0;
DateTime	tmrStart;
TimeSpan	spanCost;
	
tmrStart = System.DateTime.Now;

for(i = 0; i < 100000; i++)
{
	for(j = 0; j < 100000; j++)
	{
		dTest += i+j;
	}
}
		
spanCost = System.DateTime.Now - tmrStart;
Console.WriteLine("Test took {0} milliseconds", spanCost.TotalMilliseconds);


The project code is the same as above code snippet. All my optimizations are set to the project defaults. Surely this can't be right ??? I have tested this on two boxes; my laptop and a performance machines with multiple processors and acres of ram, and I getting comparable results on both. So what am I doing wrong ?

C:\Documents and Settings\Administrator\Desktop\DoubleTrouble\DoubleTrouble\bin>
debug\doubletrouble.exe
Test took 82218.75 milliseconds

C:\Documents and Settings\Administrator\Desktop\DoubleTrouble\DoubleTrouble\bin>
release\doubletrouble.exe
Test took 311218.75 milliseconds

C:\Documents and Settings\Administrator\Desktop\DoubleTrouble\DoubleTrouble\bin>


Thanks

Ray

"Je Suis Mort De Rire"
Blogging @ Keratoconus Watch


AnswerRe: Double Datatype and .NET Pin
Dave Kreskowiak15-May-07 7:25
mveDave Kreskowiak15-May-07 7:25 
GeneralRe: Double Datatype and .NET Pin
Ray Kinsella15-May-07 11:21
Ray Kinsella15-May-07 11:21 
AnswerRe: Double Datatype and .NET [modified] Pin
Not Active15-May-07 8:19
mentorNot Active15-May-07 8:19 
GeneralRe: Double Datatype and .NET Pin
Dave Kreskowiak15-May-07 9:24
mveDave Kreskowiak15-May-07 9:24 
GeneralRe: Double Datatype and .NET Pin
Not Active15-May-07 9:34
mentorNot Active15-May-07 9:34 
GeneralRe: Double Datatype and .NET Pin
Dave Kreskowiak15-May-07 10:19
mveDave Kreskowiak15-May-07 10:19 
GeneralRe: Double Datatype and .NET [modified] Pin
Dave Kreskowiak15-May-07 10:43
mveDave Kreskowiak15-May-07 10:43 
GeneralRe: Double Datatype and .NET Pin
Ray Kinsella15-May-07 11:19
Ray Kinsella15-May-07 11:19 
GeneralRe: Double Datatype and .NET Pin
Dave Kreskowiak15-May-07 12:58
mveDave Kreskowiak15-May-07 12:58 
GeneralRe: Double Datatype and .NET Pin
Not Active15-May-07 15:04
mentorNot Active15-May-07 15:04 
GeneralRe: Double Datatype and .NET Pin
Ray Kinsella15-May-07 11:18
Ray Kinsella15-May-07 11:18 
QuestionSerialPort.Open() question... Pin
SirTreveyan15-May-07 3:13
SirTreveyan15-May-07 3:13 
AnswerRe: SerialPort.Open() question... Pin
pbraun18-May-07 16:47
pbraun18-May-07 16:47 
QuestionImageDirectoryEntryToDataEx() not working Pin
priyank_ldce15-May-07 0:22
priyank_ldce15-May-07 0:22 
Questionurgent help Pin
shruthis914-May-07 21:19
shruthis914-May-07 21:19 
AnswerRe: urgent help Pin
Colin Angus Mackay15-May-07 2:00
Colin Angus Mackay15-May-07 2:00 
AnswerRe: urgent help Pin
Dave Kreskowiak15-May-07 4:39
mveDave Kreskowiak15-May-07 4:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.