Click here to Skip to main content
15,901,205 members
Home / Discussions / C#
   

C#

 
Question.NET 2005: 32-bit vs 64-bit code Pin
gabser6-Sep-05 6:49
gabser6-Sep-05 6:49 
Hi,

I measured the time the following code executes on a 64-bit computer:

for(int x = 0; x < 100000000; x++)
{
double a = 1234.56789 * 1234.56789;
double b = 12345.6789 * 12345.6789;
double c = a / b;
}

Testing cases:
1. code compiled in .NET 2003 (32-bit)
2. code compiled in .NET 2005 (x86; 32-bit)
3. code compiled in .NET 2005 (x64; 64-bit)

Results:
case 1 was the fastest
case 2 was a little bit slower than case 1
case 3 was around 5.5 times slower than case 2

I expected case 3 is the fastest (then case 2 and, finally, case 1).
Does anyone know why that happens?

Thank you,
AnswerRe: .NET 2005: 32-bit vs 64-bit code Pin
Dan Neely6-Sep-05 7:00
Dan Neely6-Sep-05 7:00 
AnswerRe: .NET 2005: 32-bit vs 64-bit code Pin
Daniel Turini6-Sep-05 7:11
Daniel Turini6-Sep-05 7:11 
GeneralRe: .NET 2005: 32-bit vs 64-bit code Pin
gabser6-Sep-05 7:38
gabser6-Sep-05 7:38 
AnswerRe: .NET 2005: 32-bit vs 64-bit code Pin
John Fisher6-Sep-05 7:32
John Fisher6-Sep-05 7:32 
GeneralRe: .NET 2005: 32-bit vs 64-bit code Pin
gabser6-Sep-05 7:39
gabser6-Sep-05 7:39 
GeneralRe: .NET 2005: 32-bit vs 64-bit code Pin
John Fisher6-Sep-05 8:11
John Fisher6-Sep-05 8:11 
AnswerRe: .NET 2005: 32-bit vs 64-bit code Pin
Dave Kreskowiak6-Sep-05 7:56
mveDave Kreskowiak6-Sep-05 7:56 
GeneralRe: .NET 2005: 32-bit vs 64-bit code Pin
gabser6-Sep-05 8:08
gabser6-Sep-05 8:08 
GeneralRe: .NET 2005: 32-bit vs 64-bit code Pin
Dave Kreskowiak6-Sep-05 10:11
mveDave Kreskowiak6-Sep-05 10:11 
GeneralRe: .NET 2005: 32-bit vs 64-bit code Pin
Dave Kreskowiak6-Sep-05 10:12
mveDave Kreskowiak6-Sep-05 10:12 
AnswerRe: .NET 2005: 32-bit vs 64-bit code Pin
Judah Gabriel Himango6-Sep-05 11:35
sponsorJudah Gabriel Himango6-Sep-05 11:35 
QuestionProgram Structure Pin
Kash6-Sep-05 6:21
Kash6-Sep-05 6:21 
AnswerRe: Program Strucutr Pin
Judah Gabriel Himango6-Sep-05 6:32
sponsorJudah Gabriel Himango6-Sep-05 6:32 
GeneralRe: Program Structure Pin
Kash6-Sep-05 6:45
Kash6-Sep-05 6:45 
AnswerRe: Program Structure Pin
leppie6-Sep-05 7:06
leppie6-Sep-05 7:06 
Question.Net CF 2.0 &amp; Pocket Internet Explorer Pin
tomdz6-Sep-05 6:20
tomdz6-Sep-05 6:20 
Questionfaster access memory Pin
Sasuko6-Sep-05 6:18
Sasuko6-Sep-05 6:18 
AnswerRe: faster access memory Pin
Judah Gabriel Himango6-Sep-05 6:26
sponsorJudah Gabriel Himango6-Sep-05 6:26 
AnswerRe: faster access memory Pin
Dan Neely6-Sep-05 7:06
Dan Neely6-Sep-05 7:06 
AnswerRe: faster access memory Pin
Andrew Kirillov6-Sep-05 8:25
Andrew Kirillov6-Sep-05 8:25 
QuestionDirectPlay Problem with C# Pin
Zeeshan Gulzar6-Sep-05 5:20
Zeeshan Gulzar6-Sep-05 5:20 
QuestionSaved file images Pin
Jerry Hammond6-Sep-05 4:49
Jerry Hammond6-Sep-05 4:49 
AnswerRe: Saved file images Pin
Nick Parker6-Sep-05 8:44
protectorNick Parker6-Sep-05 8:44 
GeneralRe: Saved file images Pin
Jerry Hammond6-Sep-05 10:40
Jerry Hammond6-Sep-05 10:40 

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.