Click here to Skip to main content
15,891,033 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 
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 
Just to make things a little more confusing. In the Release version or youre code, you're only doing one math problem at runtime. The optimizer will evaluate the math of 2 constant values into a resultant constant and substitute that constant for the code used to get it.

You're actually just mov'ing two float64 constants to the two locations a and b. Then the division takes place and is assigned to c as a float64 result.

You're code is actually this:
for(int x = 0; x < 100000000; x++)
{
    double a = 1524157.8750190521
    double b = 152415787.50190521
    double c = a / b;
}


But, that's not the problem. The problem is that your still running under a 32-bit OS. You can't use any of the 64-bit instruction set, including math instructions, until you replace your OS with Win64 enabled Windows. Until then, your doing 64-bit math using only the 32-bit instruction set, which, oddly enough, is slower on the 64-bit chips.


RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

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.