Mailinglist Archive: opensuse (686 mails)

< Previous Next >
Re: [opensuse] 64 bit vs 32 bit RAM consumption
David Haller said the following on 07/24/2013 11:05 PM:
>Or is
>it just misunderstanding arising from 64 bit using twice as many CPU
>registers to increase its own speed?
On the contrary. Having more registers makes the program possibly
running faster. Completely independent from memory usage.

This is completely dependent on the compiler and huge if-but-maybe situation.

It is also the basis of a conceptual architectural battle.

The advent of cheap silicon-on-a-single-chip had led us more and more down the path of multi-register machines, caching, integrated FPU and even integrated GPU.

But the FORTH model shows of effective and efficient a single-register (plus address pointer plus call/return stack pointer plus parameter stack pointer) can be.

Even with multi-register machines compilers have to be damn smart to make use of them all after a point. Oh, they are great when you are evaluating complex expressions, but the moment you make a subroutine call you have to start with a clear context, which means dumping registers and then restoring them on return .... or the equivalent.
And when you make a system call or process switch there is a lot more context to save.

Its not as simple as it sounds at first.

The old SBP9900 had a model of 'register frames' in memory. It was a 16-bit machine with 16 registers, but they were in memory (slow, yes I know) and a subroutine call just mean changing the frame pointer, which meant dumping and restoring the register ban was incredibly fast. There was a later 'RISC' machine whose designation I don't recall, which did the same thing but traded the complex instruction set for on-chip memory.

But then the RISC vs CISC argument is another thing altogether.

Yes another thing that matter is register equivalence.
Back in the 1980s, the Z-8000 and the M68000 both had a 16 registers, but the former had them all equivalent, any could be used for either computation or as an address pointer. The latter had separate computation and address registers. The computation registers could not be used as address pointers, After calculation the value had to be transferred to the addresses register. This complicated the register dump/restore algorithm no end.

By contrast, the National Semiconductor 320xx family was 'compiler friendly'. http://en.wikipedia.org/wiki/NS320xx
Its not that the Zilog Z-8000 wasn't, but the NS320xx constrained the compiler writer with the frame pointer etc where the Z-8000, following the PDP-11 and /360 model deferred this issue.

Very often hardware designer seem to be working in a different universe from software people and vice versa.

At times, compiler writing is a black art.




--
A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting frowned upon?

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups