Hi Justin, > A simple example: Why is this loop > > for(int i = count; --i >= 0 ; ) > > faster than this loop > > for(int i = 0; i < count - 1; i++ ) > > given exactly the same loop content? Ok, here is my coming out. I do programming now but don't have a solid programmer's education background. So I can't tell you why the first loop is faster. But I really would like to know more about what's going on under the hood. Could you please explain to me ? The only thing what I can see is the count - 1 statement. Is it calculated after every loop step ? Will the compiler only optimize this if count is declared const(final) ? Is this equivalent to the first loop ? const int tempCount = count - 1; for( int i = 0; i < tempCount; i ++) regards Paul =========================================================================== 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".
- Re: [JAVA3D] Grafic card question David
- Re: [JAVA3D] Grafic card question John Wright
- Re: [JAVA3D] Grafic card question Justin Couch
- Re: [JAVA3D] Grafic card question John Wright
- Re: [JAVA3D] Grafic card question Justin Couch
- Re: [JAVA3D] Grafic card question John Wright
- Re: [JAVA3D] Grafic card question Justin Couch
- Re: [JAVA3D] Grafic card question David
- Re: [JAVA3D] Grafic card question John Wright
- Re: [JAVA3D] Grafic card question Justin Couch
- Re: [JAVA3D] Grafic card question Dipl. Ing. Paul Szawlowski
- Re: [JAVA3D] Grafic card question Dipl. Ing. Paul Szawlowski
- Re: [JAVA3D] Grafic card question Bo Nygaard Bai
- Re: [JAVA3D] Grafic card question Justin Couch
- Re: [JAVA3D] Grafic card question Bo Nygaard Bai
- Re: [JAVA3D] Grafic card question Justin Couch
- Re: [JAVA3D] Grafic card question Dipl. Ing. Paul Szawlowski
- Re: [JAVA3D] Grafic card question John Pallister
- Re: [JAVA3D] Grafic card question Dipl. Ing. Paul Szawlowski
- Re: [JAVA3D] Grafic card question Dipl. Ing. Paul Szawlowski
- Re: [JAVA3D] Grafic card question Nathan Bower