Click here to Skip to main content
15,860,972 members
Articles / Programming Languages / C#

Advantages of 64-bit

Rate me:
Please Sign up or sign in to vote.
1.89/5 (2 votes)
15 Apr 2012CPOL2 min read 13.4K   2   10
Some test results.

Nowadays people who buy Windows or install Linux are confronted with the 32- vs. 64-bit choice. There are several advantages including memory management etc. This question and responses on Stack Overflow pretty much sums up the main advantages and points to consider.

I wanted to do  a real world test comparing memory operations running in different modes. This led to this question and some findings – posted on Code Review. Now I’ve done some more testing divided into four groups 32- and 64-bit pointer operations – executed in 32- and 64-bit mode. This is the output:

64-bit pointer, 64-bit mode

  • Loops: 100 Elapsed time: 6987.638000 Average: 69.876380
  • Loops: 200 Elapsed time: 13861.296000 Average: 69.306480
  • Loops: 300 Elapsed time: 20833.421000 Average: 69.444737
  • Loops: 400 Elapsed time: 27746.943000 Average: 69.367358
  • Loops: 500 Elapsed time: 34693.142000 Average: 69.386284
  • Loops: 600 Elapsed time: 39019.204000 Average: 65.032007
  • Loops: 700 Elapsed time: 38858.330000 Average: 55.511900

64-bit pointer, 32-bit mode

  • Loops: 100 Elapsed time: 5601.273000 Average: 56.012730
  • Loops: 200 Elapsed time: 11104.902000 Average: 55.524510
  • Loops: 300 Elapsed time: 16671.022000 Average: 55.570073
  • Loops: 400 Elapsed time: 22228.157000 Average: 55.570392
  • Loops: 500 Elapsed time: 27787.730000 Average: 55.575460
  • Loops: 600 Elapsed time: 33332.861000 Average: 55.554768
  • Loops: 700 Elapsed time: 38896.038000 Average: 55.565769

32-bit pointer, 64-bit mode

  • Loops: 100 Elapsed time: 13312.479000 Average: 133.124790
  • Loops: 200 Elapsed time: 22025.908000 Average: 110.129540
  • Loops: 300 Elapsed time: 33019.403000 Average: 110.064677
  • Loops: 400 Elapsed time: 44024.916000 Average: 110.062290
  • Loops: 500 Elapsed time: 55038.448000 Average: 110.076896
  • Loops: 600 Elapsed time: 66054.053000 Average: 110.090088
  • Loops: 700 Elapsed time: 77091.699000 Average: 110.130999

32-bit pointer, 32-bit mode

  • Loops: 100 Elapsed time: 13775.434000 Average: 137.754340
  • Loops: 200 Elapsed time: 27503.340000 Average: 137.516700
  • Loops: 300 Elapsed time: 41255.826000 Average: 137.519420
  • Loops: 400 Elapsed time: 54918.705000 Average: 137.296762
  • Loops: 500 Elapsed time: 67934.638000 Average: 135.869276
  • Loops: 600 Elapsed time: 66102.285000 Average: 110.170475
  • Loops: 700 Elapsed time: 77136.964000 Average: 110.195663

The obvious conclusion is that the best reason to select a 64-bit Operating System is if you have a lot of programs running in 64-bit mode. And another point for captain obvious: don’t select 64-bit OS if the code you are running is 32-bit – it will hurt the performance. The result from running with 64-bit pointers in 32-bit mode being fastest is actually a bit surprising - but it might be a result if the test environment optimizing for better performance - this test is executed on a Mac OS X machine – running 64-bit natively. To make 100% proper conclusion I would have to dual boot the same OS in different bit-settings on the same metal – which is very impossible for me!

Hopefully I’ll have the time to test on other environments soon.

This article was originally posted at http://michaelbanzon.com/2012/02/16/advantages-of-64-bit

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Denmark Denmark
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Question[My vote of 2] Source code Pin
Paw Jershauge19-Apr-12 21:51
Paw Jershauge19-Apr-12 21:51 
GeneralMy vote of 1 Pin
Yaroslav Tatarenko16-Apr-12 23:25
Yaroslav Tatarenko16-Apr-12 23:25 
GeneralRe: My vote of 1 Pin
Michael Banzon17-Apr-12 6:20
Michael Banzon17-Apr-12 6:20 
GeneralRe: My vote of 1 Pin
Yaroslav Tatarenko17-Apr-12 7:12
Yaroslav Tatarenko17-Apr-12 7:12 
GeneralRe: My vote of 1 Pin
Michael Banzon22-Apr-12 6:14
Michael Banzon22-Apr-12 6:14 
QuestionNobody cares! Pin
Thornik16-Apr-12 5:31
Thornik16-Apr-12 5:31 
AnswerRe: Nobody cares! Pin
Michael Banzon17-Apr-12 6:27
Michael Banzon17-Apr-12 6:27 
GeneralRe: Nobody cares! Pin
Thornik18-Apr-12 3:14
Thornik18-Apr-12 3:14 
QuestionWhat about the architecture Pin
Mehdi Gholam14-Apr-12 21:39
Mehdi Gholam14-Apr-12 21:39 
AnswerRe: What about the architecture Pin
Michael Banzon15-Apr-12 18:39
Michael Banzon15-Apr-12 18: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.