65.9K
CodeProject is changing. Read more.
Home

Advantages of 64-bit

starIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIconemptyStarIcon

1.89/5 (2 votes)

Apr 15, 2012

CPOL

2 min read

viewsIcon

14411

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.