Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
AnswerRe: 3 way byte merge Pin
Ennis Ray Lynch, Jr.22-Sep-10 5:07
Ennis Ray Lynch, Jr.22-Sep-10 5:07 
GeneralRe: 3 way byte merge Pin
jkohler22-Sep-10 5:15
jkohler22-Sep-10 5:15 
GeneralRe: 3 way byte merge Pin
harold aptroot22-Sep-10 5:40
harold aptroot22-Sep-10 5:40 
GeneralRe: 3 way byte merge Pin
jkohler22-Sep-10 6:00
jkohler22-Sep-10 6:00 
GeneralRe: 3 way byte merge Pin
harold aptroot22-Sep-10 6:11
harold aptroot22-Sep-10 6:11 
AnswerRe: 3 way byte merge Pin
Chris Trelawny-Ross22-Sep-10 9:19
Chris Trelawny-Ross22-Sep-10 9:19 
GeneralRe: 3 way byte merge Pin
jkohler22-Sep-10 9:35
jkohler22-Sep-10 9:35 
GeneralRe: 3 way byte merge Pin
Michael B. Hansen23-Sep-10 2:27
Michael B. Hansen23-Sep-10 2:27 
Although it propably won't give you much, you could try to optimize your for-loop in the following ways:

- Instead of having nesting the 2 for-loops - you could try to have just one
- Counting backwards
- Use != instead of <
- Use ++n instead of ++n

for( int n=(h*w)-1; n!=-1; --n)
for( int n=h*w; n!=0; --n)


Although the compiler/JIT should already have done some the above optimizations, I have seen measurable improvements doing the above in certain areas.


/Michael

Edit: Modified the for-loop as you aren't using the 'n' for indexing.
Need a 0 false positive SPAM filter? Try the free, industry leading spam filters from SPAMfighter

GeneralRe: 3 way byte merge Pin
ely_bob23-Sep-10 8:25
professionalely_bob23-Sep-10 8:25 
GeneralRe: 3 way byte merge Pin
JonHarrison23-Sep-10 2:27
professionalJonHarrison23-Sep-10 2:27 
GeneralRe: 3 way byte merge Pin
jkohler23-Sep-10 3:24
jkohler23-Sep-10 3:24 
GeneralRe: 3 way byte merge Pin
JonHarrison23-Sep-10 3:34
professionalJonHarrison23-Sep-10 3:34 
GeneralRe: 3 way byte merge Pin
harold aptroot22-Sep-10 9:51
harold aptroot22-Sep-10 9:51 
GeneralRe: 3 way byte merge Pin
Chris Trelawny-Ross22-Sep-10 11:04
Chris Trelawny-Ross22-Sep-10 11:04 
GeneralRe: 3 way byte merge Pin
harold aptroot22-Sep-10 11:42
harold aptroot22-Sep-10 11:42 
GeneralRe: 3 way byte merge Pin
Chris Trelawny-Ross22-Sep-10 12:02
Chris Trelawny-Ross22-Sep-10 12:02 
GeneralRe: 3 way byte merge Pin
harold aptroot22-Sep-10 12:25
harold aptroot22-Sep-10 12:25 
GeneralRe: 3 way byte merge Pin
Chris Trelawny-Ross22-Sep-10 12:33
Chris Trelawny-Ross22-Sep-10 12:33 
AnswerRe: 3 way byte merge Pin
philpalk23-Sep-10 3:10
philpalk23-Sep-10 3:10 
AnswerRe: 3 way byte merge Pin
[NL]PUR23-Sep-10 3:19
[NL]PUR23-Sep-10 3:19 
AnswerRe: 3 way byte merge - no joy in C# ville Pin
jkohler23-Sep-10 4:21
jkohler23-Sep-10 4:21 
AnswerRe: 3 way byte merge Pin
Michael Kingsford Gray23-Sep-10 4:36
Michael Kingsford Gray23-Sep-10 4:36 
AnswerRe: 3 way byte merge Pin
patbob23-Sep-10 6:13
patbob23-Sep-10 6:13 
GeneralRe: 3 way byte merge Pin
jkohler23-Sep-10 7:40
jkohler23-Sep-10 7:40 
AnswerRe: 3 way byte merge Pin
englebart23-Sep-10 7:32
professionalenglebart23-Sep-10 7:32 

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.