Malcolm McLean wrote, On 27/03/07 22:11:
You've got to ask what sort of person would produce a machine with a
data register size narrower than the address bus. The obvious answer is
someone who thinks that a big memory is more important than speed in
accessing it. So it is unlikely to matter that we are slowing down
integer arithemetic.
Lets start with the 80386SX which had a 16 bit data bus and a 24 bit
address buss, so fetching anything larger would require more than one
fetch. Run it with the large memory model so that you can have large
objects! Just the first off the top of my head ;-)
http://www.intel.com/design/intarch/intel386/index.htm
Addmittedly the convention, though not the standard, is breaking down in
such a case.
Cases which keep coming and going.
> Most computers spend most of their time computing array
offsets and fetching and writing data to and from them, certainly as far
as integer operations are concerned.
They may with your applications but I know a number of server and client
applications which only spend a small fraction of their time doing array
index operations. In fact, I can only think of one part of one
application where that was true.
> However that is not true of every
program, of course, and so a very integer maths-intensive programmer
would complain, with justice, that int was not the fastest type. You've
got to balance this against the inconvenience of not being able to index
an array with an int.
Do you really have any information at all to back up your claims? Since
I really do find that the majority of applications I have dealt with
over the years do more integer arithmetic because they wanted to do
integer arithmetic than because they were calculating array offsets.
Also, a number of processors have alternative ways of doing indexing
that do not involve normal arithmetic registers at all, so your argument
even if true would be irrelevant for them.