Click here to Skip to main content
15,900,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Skippums24-Aug-10 6:15
Skippums24-Aug-10 6:15 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Luc Pattyn24-Aug-10 6:33
sitebuilderLuc Pattyn24-Aug-10 6:33 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Skippums24-Aug-10 6:54
Skippums24-Aug-10 6:54 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Aescleal24-Aug-10 6:42
Aescleal24-Aug-10 6:42 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Skippums24-Aug-10 7:06
Skippums24-Aug-10 7:06 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Aescleal24-Aug-10 8:23
Aescleal24-Aug-10 8:23 
GeneralRe: Reusing an Incremented Variable within a Single Statement [modified] Pin
Joe Woodbury24-Aug-10 6:52
professionalJoe Woodbury24-Aug-10 6:52 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Niklas L24-Aug-10 7:08
Niklas L24-Aug-10 7:08 
Good points.

Joe Woodbury wrote:
const int temp = src[i];

The "const" here does nothing and ends up being slower, not just because you are confusing the compiler, but because it prevents the compiler from using an indexed assembly call.



Care to elaborate on this a bit? Why would the const affect the compiler? I would assume the compiler easier could chose an indexed call just because there is a const.

GeneralRe: Reusing an Incremented Variable within a Single Statement [modified] Pin
Joe Woodbury24-Aug-10 7:25
professionalJoe Woodbury24-Aug-10 7:25 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Niklas L24-Aug-10 7:55
Niklas L24-Aug-10 7:55 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Skippums24-Aug-10 7:17
Skippums24-Aug-10 7:17 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Joe Woodbury24-Aug-10 7:38
professionalJoe Woodbury24-Aug-10 7:38 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Paul Michalik24-Aug-10 8:00
Paul Michalik24-Aug-10 8:00 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Joe Woodbury24-Aug-10 8:50
professionalJoe Woodbury24-Aug-10 8:50 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Paul Michalik24-Aug-10 21:28
Paul Michalik24-Aug-10 21:28 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Stefan_Lang24-Aug-10 22:02
Stefan_Lang24-Aug-10 22:02 
RantRe: Reusing an Incremented Variable within a Single Statement Pin
JFDR_0225-Aug-10 6:37
JFDR_0225-Aug-10 6:37 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Skippums25-Aug-10 7:04
Skippums25-Aug-10 7:04 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Niklas L25-Aug-10 8:02
Niklas L25-Aug-10 8:02 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Skippums25-Aug-10 8:08
Skippums25-Aug-10 8:08 
GeneralRe: Reusing an Incremented Variable within a Single Statement Pin
Niklas L25-Aug-10 8:27
Niklas L25-Aug-10 8:27 
Questiondisplaying the layout of an ogg file Pin
rukita24-Aug-10 4:40
rukita24-Aug-10 4:40 
AnswerRe: displaying the layout of an ogg file Pin
Richard MacCutchan24-Aug-10 5:31
mveRichard MacCutchan24-Aug-10 5:31 
GeneralRe: displaying the layout of an ogg file Pin
rukita24-Aug-10 22:40
rukita24-Aug-10 22:40 
GeneralRe: displaying the layout of an ogg file Pin
Richard MacCutchan25-Aug-10 0:21
mveRichard MacCutchan25-Aug-10 0:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.