M
Malcolm McLean
There is an interesting social factor here. Virtually everyone has access toFlash Gordon said:Malcolm McLean wrote, On 21/04/07 17:45:
Most that you have come across possibly, but I doubt that you have come
across most architectures.
a PC, quite a high proportion of them have a C compiler installed. Quite a
lot of programmer never need to touch another platform. So those who program
other devices consider themselves to be superior beings.
Few people if any program every architecture. However as it happens I am one
of the superior beings.
That is a good argument. You could of course always say that it is up to theIt is not simply the width of the address register that is important, it
is also the memory bandwidth. Since memory is slow using 64 bit integers
when you do not need them can slow things significantly.
programmer to use a shorter type if he wants performance, or you could take
the ANSI route and make everything take and return a size_t, so that sizeof
int is irrelevant. But the reality is that most people will use a kludge of
ints and other types. So is speed more important than code falling over for
large arrays and easy interfacing? How much speed are we talking about? As I
said, engineering is like that. Normally there are some good arguments for
the opposite decision.