The Grey Labyrinth is a collection of puzzles, riddles, mind games, paradoxes and other intellectually challenging diversions. Related topics: puzzle games, logic puzzles, lateral thinking puzzles, philosophy, mind benders, brain teasers, word problems, conundrums, 3d puzzles, spatial reasoning, intelligence tests, mathematical diversions, paradoxes, physics problems, reasoning, math, science.

   
The Grey Labyrinth Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    RegisterRegister  
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What makes a 64bit processor faster than a 32bit processor?

 
Reply to topic    The Grey Labyrinth Forum Index -> Science, Art, and Culture
View previous topic :: View next topic  
Author Message
Nsof
Daedalian Member



PostPosted: Thu Sep 22, 2011 10:03 pm    Post subject: 1 Reply with quote

Assuming OS and applications are compiled for the correct architecture why would a 64bit processor/os/app be faster than a 32bit processor/os/app?

Larger address space is one potential reason.

Is large integer math a factor?(I don’t think so.)
Is floating point arithmetic a factor? (Also don’ think so)
Is larger data bus also a factor? (due to less reads? Perhaps I should first ask if the data bus is indeed bigger)
A larger instruction set?
_________________
Will sell this place for beer
Back to top
View user's profile Send private message
jesternl
Yankee Doodle Dutchie



PostPosted: Fri Sep 23, 2011 12:47 am    Post subject: 2 Reply with quote

Every CPU cycle a 64-bit CPU can handle twice the amount of data. It can also keep more data easily available, so there is less swapping if bits in and out of memory, which again leads to faster instruction handling, since no cycles need to be wasted on keeping track of where the correct data is.

Probably more, but that is what I can remember off-hand.

The instruction set is 'baked in' to the CPU, and makes no difference I believe.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
MNOWAX
0.999... of a Troll



PostPosted: Fri Sep 23, 2011 1:02 am    Post subject: 3 Reply with quote

I'm out of my element here, all i know is that 64 bit prcessors allow for more RAM allocation and use.

I'll let guys like Zag take this one...Razz
_________________
The Man The Myth The Legend
MNOWAX
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Nsof
Daedalian Member



PostPosted: Fri Sep 23, 2011 6:30 am    Post subject: 4 Reply with quote

jesternl wrote:
The instruction set is 'baked in' to the CPU, and makes no difference I believe
I think the question is all about whats 'baked' into the CPU.
Theoretically, according to the linear speedup theorem you can change the instruction set to linearly speed up computation (imagine a 'chinese' cpu that can express a word in a single complicated letter vs a several western letters for the same word. You get a more complicated cpu but one that can do more in a single instruction) . Having said that, a) This is only theory and I am not sure this is done in practice, b) IIRC different turing machines require different handling of speedup - it is not possible to do in a general way. This means that in order to use this effectively, cpu designers should focus on finding what computations are common to most applications and try to speed these at the potential loss of speed in other forms of computation. Again - i am not sure if this is done at all.

MNOWAX wrote:
I'll let guys like Zag take this one...Razz
Or Antrax who optimizes assembler code for the largest processor designer in the world Revenge most foul!
_________________
Will sell this place for beer
Back to top
View user's profile Send private message
Antrax
ESL Student



PostPosted: Fri Sep 23, 2011 8:09 am    Post subject: 5 Reply with quote

Basically, more registers and wider ones. 32 bit "eax" becomes 64 bit "rax" and similarly for other "named" registers, and you get R8-R15 in addition.
There are some other minor changes (calling conventions) but that's the "free" speedup you get.

[edit]
One thing you need to know is that 32->64 is not 2x speedup, even potentially. This isn't like moving from SSE to AVX or from a dual-core machine to a quad-core. I don't remember the exact figure, but it's a few dozen % at peak.
Also, I do multithreaded optimization these days Felicitous
_________________
After years of disappointment with get rich quick schemes, I know I'm gonna get rich with this scheme. And quick!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Zag
Unintentionally offensive old coot



PostPosted: Fri Sep 23, 2011 1:01 pm    Post subject: 6 Reply with quote

Nsof wrote:
MNOWAX wrote:
I'll let guys like Zag take this one...Razz
Or Antrax who optimizes assembler code for the largest processor designer in the world Revenge most foul!

I was about to say the same thing, and then I read his response and thought "Whaaaaa?"

Actually I understood some of it -- probably more than MNO -- but not all of it.

Think of registers as the information you have immediately accessible in your head: I can look at a phone number and remember the whole thing in my head as I grab the phone to dial it. I know my wife does only does one digit group at a time, so she has to look back twice. (U.S. phone numbers are 10 digits, grouped like 603-555-1234.) I have a bigger register than she does (or really than she chooses to use). However, if, in between looking it up and dialing, someone were to ask me a question, especially a question about numbers, I'll have to go look up the number again, since I only have the one register for numbers.

(However, Antrax, I thought 32-bit processors already had at least 16 registers.)

Then there is onboard memory, which is like having the next few numbers I have to call written down on my blotter in front of me. It's a lot faster than having the numbers in a book on my desk. The larger processor inevitably has more of that, as well.

However, having more registers, more onboard memory, better pre-fetching, etc. is not a fundamental part of being a 32-bit vs. a 64-bit processor. It is more coincidentally associated.
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
extropalopakettle
No offense, but....



PostPosted: Fri Sep 23, 2011 1:04 pm    Post subject: 7 Reply with quote

As jesternl and Antrax mention, more registers allow more variables to be kept in CPU without loading values from and storing to memory. 64 bit machines generally have more registers, but I think this is an improvement that's independent of their being 64 bit wide.

The larger address space certainly allows greater performance for some applications, where a large working data set can be kept in RAM rather than swapped in and out from disk. A large database, especially if mostly or purely read-only (or where writes need not be synced immediately) is a common example.

There are also many cryptographic algorithms (and perhaps others) that do a lot of weird seemingly random bit level stuff - XORs, bit rotations (shifts left and right), etc, and these can be adapted to run much faster (much less instructions executed) with 64 bits at a time than with 32.
Back to top
View user's profile Send private message
extropalopakettle
No offense, but....



PostPosted: Fri Sep 23, 2011 1:06 pm    Post subject: 8 Reply with quote

Zag wrote:
However, having more registers, more onboard memory, better pre-fetching, etc. is not a fundamental part of being a 32-bit vs. a 64-bit processor. It is more coincidentally associated.


You beat me.
Back to top
View user's profile Send private message
Antrax
ESL Student



PostPosted: Fri Sep 23, 2011 4:42 pm    Post subject: 9 Reply with quote

Sorry to disappoint, then.
In any case, I thought the question was practicality-oriented, not theoretically-oriented. The only theoretical gain from 64 bit addressing vs. 32 is being able to have more ram (though I guess you could probably gain something on the cache/TLB fronts as well). In reality, though, 64 bits processors came with additional registers and extended the existing ones. I think the latter is a result of the current processor design (though I'm far from an expert on that), but I'm pretty sure the former is just coincidental, as others have said.

Zag, to answer your question, there's plenty of registers for everyone - though some you can't really use (the CRs, most MSRs) and some depend on the underlying SIMD architecture (MM/XMM/YMM). I was referring to the GPRs in particular, sorry for not making it clear.
_________________
After years of disappointment with get rich quick schemes, I know I'm gonna get rich with this scheme. And quick!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jesternl
Yankee Doodle Dutchie



PostPosted: Fri Sep 23, 2011 5:28 pm    Post subject: 10 Reply with quote

Zag wrote:
However, if, in between looking it up and dialing, someone were to ask me a question, especially a question about numbers, I'll have to go look up the number again, since I only have the one register for numbers.

Wouldn't that be more analogous to predictive branch failure? Then again, that might be more when you looked up the wrong number and have to go back
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Antrax
ESL Student



PostPosted: Fri Sep 23, 2011 5:45 pm    Post subject: 11 Reply with quote

Not really, what Zag's describing is a cache miss more than anything. Register pressure is akin to trying to cook in a very small kitchen - you'll always have to move things around since your counter can't fit them all.
A branch misprediction is like completing someone's sentence and having them get pissed off because that's not what they meant. You waste time being chewed out for trying to guess instead of just listening, and then they repeat the whole thing anyway.
_________________
After years of disappointment with get rich quick schemes, I know I'm gonna get rich with this scheme. And quick!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Zag
Unintentionally offensive old coot



PostPosted: Fri Sep 23, 2011 5:55 pm    Post subject: 12 Reply with quote

Nice analogy! And my wife does that to me all the time!
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Antrax
ESL Student



PostPosted: Fri Sep 23, 2011 8:59 pm    Post subject: 13 Reply with quote

Thanks. It's actually kind of fun. See if you can recognize these microarchitectural (well, technically only 2 are) issues:

a) There's someone with the same name as you living close by. As a result, your mail takes forever to reach you, as you first have to wait for the mailman to send it to the other guy, then go over there to sort things out.
b) Your phone only has ten entries under speed dial, but you have twenty friends and they all complain if they're not on it, so whenever you go to visit one of them, you have to spend time looking up their number and putting it under speed dial.
c) You're a frequent flier but so's the elderly gentlemen in front of you in the express boarding lane, and he's taking forever to find his boarding pass and asking a million questions, leaving you to look enviously at the lucky passengers who bought economy.
_________________
After years of disappointment with get rich quick schemes, I know I'm gonna get rich with this scheme. And quick!
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MNOWAX
0.999... of a Troll



PostPosted: Fri Sep 23, 2011 9:08 pm    Post subject: 14 Reply with quote

you see I'm come from twenty years of trial and error, not formal education, so my knowledge is very spotty when it comes to stuff that wouldn't be used in experiences of fixing computers

Nice to know who i can send questions like that to. Revenge most foul!
_________________
The Man The Myth The Legend
MNOWAX
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous: by   
Reply to topic    The Grey Labyrinth Forum Index -> Science, Art, and Culture All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Site Design by Wx3