4 ms·
Modern chips have over a hundred registers per logical core, but either 16 or 32 you can explicitly access.
by ryacko 8y ago
Modern chips have over a hundred registers per logical core, but either 16 or 32 you can explicitly access.
- MuffinFlavored 8y agoDo you think in the future more registers will be accessible, increasing performance?
- lightsighter 8y agoProbably not. The out-of-order execution units in the cores rely heavily on register renaming to remove anti-dependences in the instructions stream and get more instructions executing in parallel. History (so far in most cases) has shown that this is a better approach to getting good performance than having compilers or humans try to statically manage all the physical registers themselves.
- WallWextra 8y agoMore architected (i.e. program-visible) registers require more bits to encode.
- bluGill 8y agoBack when AMD designed x86_64 asked that question: they concluded that it was better only show a few registers because that was all compilers really needed (compilers writers had learned a lot of tricks from the mess that x86 was), and so they could better deal with a small instruction set that fewer registers offers for greater performance.
- MuffinFlavored 8y ago> from the mess that x86 was Is ARM seen as a mess? Are x86's days numbered as ARM catches up and becomes more widespread for personal computing devices?
- bluGill 8y agoARM is much better as an instruction set, but it isn't clear if that will ever matter.
- ahartmetz 8y agoBut AMD also increased the number of general-purpose registers from ~6 in x86 (eax to edx and the not fully general purpose esi, edi, esp, ebp) to ~16 in AMD64 (rax to r16). ARM has ~32.
- deleted 8y ago[deleted]
- ryacko 8y agoIt depends on the complexity of the sensitive variables. This looks like a purely academic exercise.
- blattimwind 8y agoYour programs can potentially use all of those registers (or all those assigned to your task, if the particular core uses static partioning for registers). Unlike the compiler's work, the core does this based on real, current runtime information.
- chrisseaton 8y agoThey are accessible - they aren’t sitting there unused. They’re dynamically allocated to logical names as the program runs.