Justin,

> You'd be surprised about how much programmers don't understand many
> really fundamental things about computer programming. That is, they are
> never taught (and probably rightly so) this like about how a for loop
> gets converted to a set of CPU op-codes and then what those opcodes
> might do in hardware (for example, how many programmers on this list
> understand the concept of optimal path programming in 3D graphics?).

I believe that the reason for us not being taught issues such as this
(although we did go into the usual search algorithm performance thing at
uni) is that it simply doesn't matter for most applications. People seem
more bothered with good design (50% of all projects fail / over-run / go
over-budget), and formally proving that a program matches a specification.

I agree that this sort of thing is useful in situations such as HPC and 3D.

My guess as to why the first loop is faster is that it has something to do
with either the way cache lines are loaded, or that the compiler will
generate a looper that is optimal for 99% of the time (i.e. while condition
is not yet met) rather than the other way around. Wouldn't a good compiler
catch this sort of thing anyway though?

Eagerly awaiting your answers,

Nathan

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to