Malcolm McLean wrote, On 29/03/07 22:50:
There are often things that you know to be true without having done
studies on them. Often you can avoid the expense of a full study by
looking at other relevant data. We know the number of array loads and
stores, we know the number of integer loads,
You do NOT know that every integer load has anything to do with arrays.
> and we know that there must
be atleast one integer operation for every array access. We also know
that floating point number are not used in array indexing, and we have
them to compare.
The number of floating point operations is completely irrelevant. Unless
you can provide some evidence that the number of integer operations not
to do with indexing are comparable to the number of floating point
operations. Since a lot of code explicitly avoids floating point
operations it is obviously a false assumption for a lot of code.
You can of course claim that C programs are completely different in
their characteristics to Java programs,
Stated a valid reason for such a claim, namely that Java is generally
used for OOP (it being an language designed for it) and C is often used
for thins other than OOP (having not been designed for it, although it
can be done). Seems like an excellent reason for things to be different.
> or that the dataset is too
small.
Can you honestly claim that 18 benchmarks for one language is going to
be representative of millions of programs for a drastically different
language?
> If a lot was at stake then of course we would merely use the
intial data to guide our hypotheses.
It is your hypothesis not mine, either acept that it is just your
limited experience (everyone's experience is limited compared to the
amount of code written) or tell us what your evidence was for making the
claim. After all, you must already have the evidence if it was not just
your gut feeling based on your experience.
> But a lot isn't at stake. I am
happy to spend a few minutes rooting about on the net for usage
statisitics,
Next time try to find some relevant statistics, which means either
working from the raw data or from studies related to what you are trying
to prove. Or state opinions as opinion rather than fact and accept that
some people may disagree with your opinion.
> but not to spend days tagging C variables as indexing or
non-indexing and tracing them back from the machine code.
Doing that on the limited amount of code you have would be unlikely to
convince me since I don't think you have any code for avionics systems,
marine systems, radio systems or financial systems, just to name a few
area I've had some involvement in (I've not done much on marine or
radio) or the even larger number of types of SW around that I've had
nothing to do with.
> As it is the
claim of "exactly no evidence" must be withdrawn.
Why? I stated clearly why it does not provide evidence for it and you
have not addressed my reasons for saying it does not.
Just to be clear, I've said the study you cited presented no evidence
for you claim, not that there is no evidence. For all I know there might
be vast amounts of evidence that would support your claim if you
presented it, but you have not. When I ask if someone has evidence to
support what they claim as fact I expect them to provide it not me.
> But really you should
know that computers spend most of their time moving data about.
Most of my code is designed to only move data when it needs to, so most
of it spends only a small fraction of the time moving data. On the *one*
instance in over 20 years where this was provably false it was also
blindingly obvious that the wrong processor had been chosen, because the
only reason it had to do a lot of data moving was that it had a very
small amount of fast memory when it was trying to process very large
amounts of data so it had to keep moving data on to the fast memory. Oh,
there was one other example, but it was too slow so I changed it so that
it was moving vastly less data (and spending less time moving data than
on other tasks) and told the original designer why it should have been
done differently to reduce it even further.
Approximately one quarter of all mainframe cycles are used for sorting,
for example.
Again, where is your evidence of this? Also, where is your evidence that
most clock cycles are spent by a small number of mainframes rather than
orders of magnitude more PCs or the even larger number of embedded
processors? Also, since the number of cycles to fetch an integer (even
without indexing) is often far larger than the number of cycles for an
add (or even multiply on some processors) that would still not prove
your point that most integer operations are for indexing.
Taking any one example, or class of example, cannot prove what the
overall averages unless you also prove that the class is large enough to
overwhelm the sum of all the other classes.
Don't forget also that your initial challenge was because I said a
number of processors can do the indexing in addressing units so the size
of an int does not have to be determined by indexing calculations. Some
of these processors can even do the hopping around required to
efficiently implement an FFT using just the indexing hardware without
use of the arithmetic unit, so even after proving the point that most
integer arithmetic is for indexing (which I do not believe) you would
still have further work to do.