WillDur said:
While I admire your insite into my specific coding project... In my
case...
it actually matters... bounds checking is taking about 50% of my
processing
time...
You mean to say that 50% of the processing is being used by array bounds
checking?
No way........
How much do you expect to gain my turning off array bounds checking in the
compiler?. As I mentioned, what % of your code is spent in the code that
checks the array bounds. My guess, would be about 1%, or perhaps 2% max.
Further, turning off array bounds checking will give you about 8%..(that is
tops WHEN your compiler has that option. Further, the benefits are only
going to be realized ONLY ON THE LINES of code that actually ref the
array..).
What the above means if you are processing 500 000 000 (500 million
elements), then you are going to save about 5-8% at most. Lets be nice, and
take a figure of about 8%
That means in a 100 seconds of processing the loop, you will save 8 seconds.
Really, not significant at all. And, since a computer can process those 500
million elements in about 2 seconds, then 10% of that would about .2 of a
second. (2 tenths of a second is not very much...and is if you are
processing 500 million elements).
Are you really telling me that you are processing more then 500 million
elements in a array? I would like to see that. How many elements are you
processing? (at least admit that number)
As the numbers and math stand now, you are look at about a savings of .2 of
second here for every 1/2 billion elements processed.. Really, very
insignificant.
In fact, I would have to guess that those numbers you are processing come
from some file, or somewhere ? Where does such a large amount of numbers
come from? Are you really processing 500 million elements?
Take your example loop, and place it into VB...and try compiling with the
array bounds turned off. You not going to get more then 10%.
If you are REALLY unconvinced of the above, then simply post the routine
that loops..and I be able to give you a real serious analyses of exactly how
much you can expect to gain...
Sorry to be blunt, but array bounds checking is NOT going to give you any
significant amount of reduction of time for your code....at most 8%.
So, you are chasing something with a false believe that you can expect some
gains in your code execution speed...and you will not...
Of course, as mentioned, we don't have the option anyway.
I you don't believe the above, then post your code...we will go though line
by line, and build a table of each line...and what % of that line of code
you will save by having array bounds turned off.
Now, if you are not doing any type of i/o, then I would certainly concede
that a native compile would help. Roughly a factor of 6-12 times faster..and
that is significant. However, even with a native compiler..turning off the
array bounds checking is not going to give you more then 10% ....
Sorry, that is just the way it is...no matter how you slice and dice it...